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

str

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

str

bot.constants.CANCELLATION_MESSAGE_KEY = 'cancellation_message_key'

Each context.user_data[CANCELLATION_MESSAGE_KEY] is expected to be the last telegram.Message with an telegram.InlineKeyboardMarkup sent in the process of cancelling the members membership.

Type

str

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 contain False, if no conversation is active.

Type

str

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

str

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

str

bot.constants.EDITING_MESSAGE_KEY = 'editing_message_key'

Each context.user_data[EDITING_MESSAGE_KEY] is expected to be the last telegram.Message with an telegram.InlineKeyboardMarkup sent in the process of editing the members data.

Type

str

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

str

bot.constants.GAME_KEY = 'game_key'

Each context.user_data[GAME_KEY] is expected to contain information to be used by bot.GameHandler.

Type

str

bot.constants.GAME_MESSAGE_KEY = 'game_message_key'

Each context.user_data[GAME_MESSAGE_KEY] is expected to be the last telegram.Message with an telegram.InlineKeyboardMarkup sent in the process of setting up a game.

Type

str

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

str

bot.constants.ORCHESTRA_KEY = 'orchestra'

Each context.bot_data[ORCHESTRA_KEY] is expected to be an components.Orchestra.

Type

str

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

str

bot.constants.REGISTRATION_PATTERN = 'requesting_registration'

telegram.CallbackQuery s with this as callback_data will trigger a registration request.

Type

str

bot.constants.YOURLS_KEY = 'yourls_key'

Each context.bot_data[YOURLS_KEY] is expected to be the YOURLS client.

Type

str