bot.constants Module#
Constants for the bot.
- bot.constants.ADMIN_KEY: str = 'ADMIN_KEY'
The admins chat id is stored under this key in
bot_data
.- Type:
- bot.constants.BACKGROUND = '#16202cff'
Background color.
- Type:
- bot.constants.BIG_TEXT_FONT = <PIL.ImageFont.FreeTypeFont object>
Font to use for big text in the body.
- Type:
PIL.ImageFont.Font
- bot.constants.BODY_TEMPLATE = 'templates/body.png'
Path of the template for the body.
- Type:
- bot.constants.FALLBACK_PROFILE_PICTURE = 'logo/TwitterStatusBot-rectangle.png'
Path of the picture to use as profile picture, if the user has none.
- Type:
- bot.constants.FONTS_DIRECTORY = 'fonts'
Name of the directory containing the fonts.
- Type:
- bot.constants.FONT_HEAVY = 'fonts/seguibl.ttf'
Font of the main text.
- Type:
- bot.constants.FONT_SEMI_BOLD = 'fonts/seguisb.ttf'
Font of the secondary text.
- Type:
- bot.constants.FOOTER_FONT = <PIL.ImageFont.FreeTypeFont object>
Font to use for the footer.
- Type:
PIL.ImageFont.Font
- bot.constants.FOOTER_TEMPLATE = 'templates/footer.png'
Path of the template for the footer.
- Type:
- bot.constants.HEADERS_DIRECTORY = 'headers'
Name of the directory containing the saved headers.
- Type:
- bot.constants.HEADER_TEMPLATE = 'templates/header.png'
Path of the template for the header.
- Type:
- bot.constants.HOMEPAGE: str = 'https://bibo-joshi.github.io/twitter-status-bot/'
Homepage of this bot.
- Type:
- bot.constants.HYPHENATOR = hyphen.hyphenator.Hyphenator object. language: en_US, dictionary at .home/runner/.local/share/pyhyphen/hyph_en_US.dic
A hyphenator to use to wrap text.
- Type:
PyHyphen.Hyphenator
- bot.constants.LTR = 'ltr'
Text direction left to right.
- Type:
- bot.constants.REMOVE_KEYBOARD_KEY: str = 'REMOVE_KEYBOARD_KEY'
Store a message object in under this key in
chat_data
to remove its reply markup later on withutils.remove_reply_markup()
.- Type:
- bot.constants.SMALL_TEXT_FONT = <PIL.ImageFont.FreeTypeFont object>
Font to use for small text in the body.
- Type:
PIL.ImageFont.Font
- bot.constants.STICKER_CHAT_ID_KEY: str = 'STICKER_CHAT_ID_KEY'
The name of the chat where stickers can be sent to get their file IDs is stored under this key in
bot_data
.- Type:
srt
- bot.constants.TEMPLATE_DIRECTORY = 'templates'
Name of the directory containing the templates.
- Type:
- bot.constants.TEXT_MAIN = '#ffffff'
Color of the main text.
- Type:
- bot.constants.TEXT_SECONDARY = '#8d99a5ff'
Color of secondary text.
- Type:
- bot.constants.USER_HANDLE_FONT = <PIL.ImageFont.FreeTypeFont object>
Font to use for the user handle.
- Type:
PIL.ImageFont.Font
- bot.constants.USER_NAME_FONT = <PIL.ImageFont.FreeTypeFont object>
Font to use for the username.
- Type:
PIL.ImageFont.Font
- bot.constants.VERIFIED_IMAGE = <PIL.PngImagePlugin.PngImageFile image mode=RGBA size=27x27>
The »verified« symbol as Pillow image in the correct size.
- Type:
Pillow.Image.Image
- bot.constants.VERIFIED_TEMPLATE = 'templates/verified.png'
Path of the template for the »verified« symbol.
- Type: