Skip to content

Game thread

The game thread is a public thread in the game history channel that the bot creates for a game when it starts. The thread holds the game card: it shows the players, their nations, the Steam link to the lobby if one was added, and, after the game is finished, the result.

What the game thread does

After the start, the game goes on in the thread. The bot does six jobs there:

  • Gathers the players. In the first message, the bot mentions the game's players who are on the server, so they land in the thread. On a server that the CivBot site works with, that message also has a hint after the mentions: “💡 Drop the save file (.Civ5Save) here after the game to keep its charts on the site.”
  • Shows the game card. The card shows the game's state, the players' seat numbers, their nations and bans.
  • Lets you pick nations. You pick nations in the menu under the game card or in the “Nation Assignment” messages. See Picking nations and swapping slots.
  • Posts the lobby link. If a Steam link to the Civilization V lobby was added, it sits on the card while the game is in progress.
  • Accepts a save. On a server that the CivBot site works with, the bot accepts Civilization V save files in the thread and replies with a card. See Save in the game thread.
  • Keeps the summary. After the game is finished or scrapped, the thread stays in the game history channel, and the card shows how the game ended.

What it includes

Part What it means
Name Game number, mode, number of players and game type
First message Mentions of the game's players who are on the server; on the site's server, also the hint about the save
Command block A hint with the commands “«Finish game»” and “«Refresh game»” above the card
Game card Header with the state, players with their nations, rank stars and bans, the added Steam link
Menus and button under the card “Choose who plays which nation”, “Swap requests between players”, “Cancel game”; on the site's server, also the “On site” link
“Nation Assignment” A message with nation buttons, only after a start without a draft

Thread name

The thread name is made of the game number, the mode, the number of players and the game type. For example, “248 — FFA 6 Patch” is game #248 in FFA mode for six players, type Patch. In Duel, the name has no number of players. Game numbering is separate on each server.

Game card

Above the card there is a block with two commands: “«Finish game»” — /game finish, and “«Refresh game»” — /game refresh. You can click a command in the block, and Discord puts it into the message box.

The card header repeats the thread name, and after the 🚦 icon it shows the game state, “In progress”. While the game is in progress, the card's stripe is green. The bot writes the game card in the server's language. See Bot language. On a server that the CivBot site works with, the card header leads to the game page on the site, not to the thread. See Game page.

For each player, the card shows six things:

  • the seat number “1.”, “2.” and so on, which the bot hands to the players at random at the start;
  • the emoji of the nation that the player picked or that the site read from an attached save; a nation from the save takes precedence over a pick, and while there is no nation, there is no emoji either;
  • the player's rank stars;
  • the player's mention;
  • three nations to choose from, if the game started with a draft;
  • the player's bans under a spoiler: click the hidden line to see them.

More about stars: Ranks and stars.

While the game is in progress, there are up to three items under the card:

  • “Choose who plays which nation” — the nation pick menu; only after a start with a draft.
  • “Swap requests between players” — the slot swap menu; only in FFA.
  • “Cancel game” — a button that opens a confirmation window; as soon as the window is submitted, the game becomes “Scrap”.

On a server that the CivBot site works with, a game in progress has a fourth item under the card: the link button “On site”, which leads to the game page on the site.

After a start without a draft, there is no nation pick menu. Instead, the bot posts a “Nation Assignment” message in the thread with buttons for the nations that aren't banned. See Picking nations and swapping slots and Scrapping a game.

The Steam link leads to the Civilization V lobby in Steam. It starts with steam://joinlobby/, followed by three numbers separated by slashes. You can add the link in three ways:

  • During the gathering — with the “Steam Link” button under the gathering card. After the start, the link moves to the game card. See Creating a game and gathering players.
  • In the game thread — as a separate message that contains only the link, while the game is “In progress”. The bot deletes that message and shows the link on the game card.
  • On the site — on a server that the CivBot site works with, a player of the game clicks “Join the game” on the game page. The site looks at which Steam lobby the game's players are in right now, and if it differs from the saved one, it saves it as the game's Steam link; the bot redraws the card. This works only for the game's players, while the game is in progress and no more than 48 hours have passed since its start. See Game page.

On the card, the link sits under the players in a separate block with the caption “link added”. When the game is finished or scrapped, the link disappears from the card.

Refreshing the card

The /game refresh command refreshes the game card with the latest data.

In the game thread, you don't need to give the number: the bot works it out. Outside the thread, add the game option with the game number:

/game refresh game:248

After refreshing, the bot replies privately “Refreshed”. The command doesn't work in direct messages to the bot.

Redrawing after changes on the site

This works on a server that the CivBot site works with. When a game is changed on the site — a nation is picked, a save is attached, players are matched, the Steam link is changed or the game is finished — the bot redraws the game card in the thread by itself. After a game is finished on the site, it also updates the list of recent games on the panel. So you don't need /game refresh for this.

Save files in the thread

This works on a server that the CivBot site works with. A player of the game drops a .Civ5Save file into the thread, the bot puts ⏳ on the message, passes the file to the site, replies with a card (“Save accepted”, “Save already taken”, “Save does not fit this game” and others) and puts ✅ or ❌. After a save is accepted, the bot redraws the game card. If the game is finished and has no save attached, the bot posts “Keep this game's story” in the thread once, with an “On site” button. See Save in the game thread.

How it connects

  • Game start — the bot creates the thread and posts the game card in it at the start; see Starting a game.
  • Picking nations — you pick nations in the menu under the card or in the “Nation Assignment” messages; see Picking nations and swapping slots.
  • Finishing a game — the result is recorded with the /game finish command or by a player of the game on the game page on the site, and the card shows the summary; see Finishing a game and Finishing a game on the site.
  • Save — you can drop a save file into the thread; see Save in the game thread.
  • Site — the game card leads to the game page on the site; see Game page.
  • Scrapping a game — the “Cancel game” button under the card opens a confirmation window, after which the game becomes “Scrap”; see Scrapping a game.
  • Ranks — the stars next to a player on the card show their rank; see Ranks and stars.
  • Game history channel — the bot creates threads in it, and the server admin sets it; see Adding CivBot to a server.

Game states in the thread

In the thread, a game is in one of three states. The state is written in the card header after the 🚦 icon, and the stripe color hints at it too.

State What the card shows Who sets it
“In progress” Green stripe, command block, players with nations to choose from and bans, the added Steam link, menus and a button under the card, and on the site's server also the “On site” link A game participant or a moderator, with “Start with Draft” or “Skip Draft & Start”
“Finished” Gold stripe, the win type next to 🥇, the number of turns next to 🏇, 🏆 next to the winner, in FFA the rating change of each player; on the site's server, the “Results on site” button A game participant or a moderator, with the /game finish command; a player of the game, with the “Finish the game” button on the game page on the site
“Scrap” Red stripe, the players and their nations with no winner and no result; on the site's server, the “On site” button A game participant or a moderator, with the “Cancel game” button and a confirmation

In FFA, the rating change sits in the player's line after the nation emoji, for example “+12” or “-8”, followed by an up or down icon. After the game is finished or scrapped, the bot removes the command block, the menus, the “Cancel game” button and the Steam link from the card. It deletes the “Nation Assignment” messages. On a server that the CivBot site works with, a finished card keeps the “Results on site” link, and a scrapped one keeps “On site”. A moderator who doesn't play in the game finishes it only in Discord: on the site, they can only look. The thread itself stays in the game history channel.

stateDiagram-v2
    state "In progress" as ongoing
    state "Finished" as finished
    state "Scrap" as cancelled
    [*] --> ongoing: a participant or a moderator presses “Start…”
    ongoing --> finished: a participant or a moderator runs /game finish
    ongoing --> finished: a player in the game finishes the game on the site
    ongoing --> cancelled: a participant or a moderator presses “Cancel game” and confirms
    finished --> [*]
    cancelled --> [*]

The diagram doesn't show the thread being archived. A thread is archived regardless of the game's state, and the state doesn't change because of it.

Rules

Everyone who can see the game history channel can see the game thread

The thread is public: anyone who can see the game history channel can open and read it. The bot adds the game's players who are on the server to the thread by mentioning them in the first message.

Only game participants and moderators run the game in the thread

Only game participants and moderators use the “Choose who plays which nation” menu, the “Cancel game” button and the nation buttons in the “Nation Assignment” messages. To everyone else, the bot replies “You are not allowed to perform this action.” Only game participants can ask for a slot swap in the “Swap requests between players” menu. See Players, moderators and admins.

A thread is archived after 24 hours without new messages

Discord hides such a thread from the channel list. The game doesn't change because of it: the state, nations and Steam link stay on the card. While the game is in progress, the bot brings the thread back from the archive every time it redraws the card: after a nation is picked in Discord or on the site, a slot swap, /game refresh, a save being attached and other changes on the site. For a finished or scrapped game, the bot unarchives the thread only while it edits the card and then archives it again. If the thread stays hidden, write any message in it.

The message must consist of a single steam://joinlobby/… link with no other text. If a message has other text besides the link, the bot leaves it in the thread, and the card doesn't change.

A new link sent in the thread, added during the gathering or found through “Join the game” on the site replaces the previous one. The card shows the latest of them.

Anyone on the server can refresh the card

The /game refresh command refreshes the card with the latest data. Someone who doesn't play in this game can run it too.

What can go wrong

  • The game thread disappeared from the channel list. The thread was archived because nobody wrote in it for 24 hours. Find it among the archived threads of the game history channel and write a message in it. If the game is in progress, the thread also comes back by itself after any card update, for example after /game refresh.
  • The message with the link stayed in the thread, but the card has no link. The message has other text, or the link looks different. Send a separate message with only the link, from steam://joinlobby/ to the last number.
  • The bot asks you to give a game number. When you run /game refresh outside a game thread without a number, the bot replies “Specify game_id or call command from game thread”. Add the game option with the game number or run the command in the game thread.
  • The bot says the game wasn't found. When you run /game refresh with the game option, the bot replies “Гру #248 не знайдено…” (it always words this reply in Ukrainian): there is no game with that number on this server. Check the number against the game thread name, because numbering is separate on each server.
  • The bot says you don't have access. The bot replies “You are not allowed to perform this action.” when someone who doesn't play in this game and isn't a moderator clicks a menu or button in the game thread. Ask one of this game's players.
  • The bot says the game is already finished. The bot gives this reply, always in English, to /game finish when the game has already been finished: “Game was already finished by another player or not found. Please refresh to see results.” Run /game refresh in the game thread, and the card will show its state. See Finishing a game.

This page was translated with AI and checked against the bot's terms.