Game

Raw MD
This object represents a game

This object represents a game. Use BotFather to create and edit games, their short names will act as unique identifiers.

Fields

FieldTypeRequiredDescription
titleStringAlwaysTitle of the game
descriptionStringAlwaysDescription of the game
photoArray of PhotoSizeAlwaysPhoto that will be displayed in the game message in chats
textStringOptionalBrief description of the game or high scores included in the game message. Can be automatically edited to include current high scores for the game when the bot calls setGameScore, or manually edited using editMessageText. 0-4096 characters.
text_entitiesArray of MessageEntityOptionalSpecial entities that appear in text, such as usernames, URLs, bot commands, etc.
animationAnimationOptionalAnimation that will be displayed in the game message in chats. Upload via BotFather.
Botlify Cloud Runtime
Credentials are auto-injected in .env — always load them with getenv(): BOT_TOKEN, ADMIN_CHAT_ID, BOT_USERNAME. Main database: database.db (SQLite, WAL mode). Runtime errors: error.log. Quick test: send to $ADMIN_CHAT_ID. Full details: Runtime Reference.