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
- 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
- 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 ofdatetime.date
andint
, where the latter is an index ofINSTRUMENTS
stating which instrument groups turn to swipe it was at the specified date of the last rehearsal.- Type
- bot.constants.PAUSED_KEY = 'paused'¶
Key for the
bot_data
. The corresponding value is expected to be adatetime.date
indicating the start of the pause, if rehearsals are paused, orFalse
.- Type
- bot.constants.PAUSED_WEEKS_KEY = 'paused_weeks'¶
Key for the
bot_data
. The corresponding value is expected to be a set ofdatetime.date
objects specifying tuesdays without rehearsal.- Type
- bot.constants.PAUSE_BUTTON: str = 'pause_button {} {}'¶
Callback data to pause a week. Use as
PAUSE_BUTTON.format(date.isoformat(), paused)
- Type
- 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
- 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
- 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
- bot.constants.PAUSE_NAVIGATION_DONE: str = 'pause_navigation_done'¶
Callback data to finish pausing weeks.
- Type
- bot.constants.PROMOTE_USER: str = 'promote_user {} {}'¶
Callback data to promote a user. Use as
PROMOTE_USER.format(promote_bool, user_id)
.- Type
- 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
- bot.constants.TIMEZONE: pytz.tzinfo.BaseTzInfo = <DstTzInfo 'Europe/Berlin' LMT+0:53:00 STD>¶
Timezone object for Europe/Berlin
- Type
pytz.BaseTzInfo