bot.constants Module

The module contains constants used throughout the bot.

bot.constants.ADD_USER: str = 'add_user {} {}'

Callback data to add a user. Use as ADD_USER.format(role_name, user_id).

Type

str

bot.constants.ADD_USER_PATTERN: str = '^add_user (board_role|watcher_role) (\\d+)$'

Callback data to catch ADD_USER. The selected role and user id will be available as matches.

Type

str

bot.constants.BOARD_ROLE = 'board_role'

Name of the ptbcontrib.roles.Role for the board.

Type

str

bot.constants.HOMEPAGE: str = 'https://akablas.github.io/akablas-bot/'

Homepage of this bot.

Type

str

bot.constants.INSTRUMENTS: List[str] = ['Flöten & Oboen', 'Klarinetten', 'Altsaxsophone', 'Tenorsaxophone, Baritonsaxophone', 'Trompeten', 'Flügelhörner', 'Tenorhörner, Hörner, Baritone, Fagotte', 'Posaunen', 'Tuben, Gitarren, Bässe']

List of instrument groups in the order that they be assigned to swipe the rehearsal room.

Type

List[str]

bot.constants.LAST_SWEEP_KEY = 'offset'

Key for the bot_data. The corresponding value is expected to be a tuple of datetime.date and int, where the latter is an index of INSTRUMENTS stating which instrument groups turn to swipe it was at the specified date of the last rehearsal.

Type

str

bot.constants.PAUSED_KEY = 'paused'

Key for the bot_data. The corresponding value is expected to be a datetime.date indicating the start of the pause, if rehearsals are paused, or False.

Type

str

bot.constants.PAUSED_WEEKS_KEY = 'paused_weeks'

Key for the bot_data. The corresponding value is expected to be a set of datetime.date objects specifying tuesdays without rehearsal.

Type

str

bot.constants.PAUSE_BUTTON: str = 'pause_button {} {}'

Callback data to pause a week. Use as PAUSE_BUTTON.format(date.isoformat(), paused)

Type

str

bot.constants.PAUSE_BUTTON_PATTERN: str = '^pause_button (\\d{4}-\\d{2}-\\d{2}) (True|False)$'

Callback data to catch PAUSE_BUTTON_PATTERN. The selected tuesday and whether a rehearsal should take place or not will be available as matches.

Type

str

bot.constants.PAUSE_NAVIGATION_BUTTON: str = 'pause_nav_button {}'

Callback data to navigate between weeks while pausing a weeks. Use as PAUSE_NAVIGATION_BUTTON.format(date.isoformat()).

Type

str

bot.constants.PAUSE_NAVIGATION_BUTTON_PATTERN: str = '^pause_nav_button (\\d{4}-\\d{2}-\\d{2})$'

Callback data to catch PAUSE_NAVIGATION_BUTTON. The selected tuesday will be available as match.

Type

str

bot.constants.PAUSE_NAVIGATION_DONE: str = 'pause_navigation_done'

Callback data to finish pausing weeks.

Type

str

bot.constants.PROMOTE_USER: str = 'promote_user {} {}'

Callback data to promote a user. Use as PROMOTE_USER.format(promote_bool, user_id).

Type

str

bot.constants.PROMOTE_USER_PATTERN: str = '^promote_user (True|False) (\\d+)$'

Callback data to catch PROMOTE_USER. The boolean and user id will be available as matches.

Type

str

bot.constants.TIMEZONE: pytz.tzinfo.BaseTzInfo = <DstTzInfo 'Europe/Berlin' LMT+0:53:00 STD>

Timezone object for Europe/Berlin

Type

pytz.BaseTzInfo

bot.constants.USER_GUIDE: str = 'https://akablas.github.io/akablas-bot/userguide.html'

User guide for this bot.

Type

str

bot.constants.WATCHER_ROLE = 'watcher_role'

Name of the ptbcontrib.roles.Role for the watchers, i.e. chats that can see who’s turn it is for swiping but can’t administrate the bot.

Type

str