bot.constants Module¶
This module contains several constants for the bot.
- bot.constants.ADMIN_KEY = 'admin_key'¶
Each
context.bot_data[ADMIN_KEY]
is expected to be the admins chat id.- Type
- bot.constants.BANNING_KEY = 'banning_key'¶
Each
context.user_data[BANNING_KEY]
is expected to be the last user id of a user to be banned from the bot.- Type
- bot.constants.CANCELLATION_MESSAGE_KEY = 'cancellation_message_key'¶
Each
context.user_data[CANCELLATION_MESSAGE_KEY]
is expected to be the lasttelegram.Message
with antelegram.InlineKeyboardMarkup
sent in the process of cancelling the members membership.- Type
- bot.constants.CONVERSATION_KEY = 'conversation'¶
Each
context.user_data[CONVERSATION_KEY]
is expected to contain information about which conversation the user is currently in. Should containFalse
, if no conversation is active.- Type
- bot.constants.DENIED_USERS_KEY = 'denied_users_key'¶
Each
context.bot_data[DENIED_USERS_KEY]
is expected to be a list of user ids, which were denied registration.- Type
- bot.constants.EDITING_ADMIN_KEY = 'editing_admin_key'¶
Each
context.user_data[EDITING_ADMIN_KEY]
is expected to be a bool stating of it’s the admin editing a user or not.- Type
- bot.constants.EDITING_MESSAGE_KEY = 'editing_message_key'¶
Each
context.user_data[EDITING_MESSAGE_KEY]
is expected to be the lasttelegram.Message
with antelegram.InlineKeyboardMarkup
sent in the process of editing the members data.- Type
- bot.constants.EDITING_USER_KEY = 'editing_user_key'¶
Each
context.user_data[EDITING_USER_KEY]
is expected to be the id of a user to be edited. Only relevant for the admin.- Type
- bot.constants.GAME_KEY = 'game_key'¶
Each
context.user_data[GAME_KEY]
is expected to contain information to be used bybot.GameHandler
.- Type
- bot.constants.GAME_MESSAGE_KEY = 'game_message_key'¶
Each
context.user_data[GAME_MESSAGE_KEY]
is expected to be the lasttelegram.Message
with antelegram.InlineKeyboardMarkup
sent in the process of setting up a game.- Type
- bot.constants.INLINE_HELP = 'inline_help'¶
If start message with this as deep linking parameter is received, a help message about the inline mode should be displayed.
- Type
- bot.constants.ORCHESTRA_KEY = 'orchestra'¶
Each
context.bot_data[ORCHESTRA_KEY]
is expected to be ancomponents.Orchestra
.- Type
- bot.constants.PENDING_REGISTRATIONS_KEY = 'pending_registrations'¶
Each
context.bot_data[PENDING_REGISTRATIONS_KEY]
is expected to be a dictionary of type Dict[int
, List[components.Member
]], where each entry represents a user registration request, which needs to be processed by the admin.- Type
- bot.constants.REGISTRATION_PATTERN = 'requesting_registration'¶
telegram.CallbackQuery
s with this ascallback_data
will trigger a registration request.- Type