Toggle Light / Dark / Auto color theme
Toggle table of contents sidebar
Source code for slidgram.config
from typing import Optional
[docs]
_api_txt = " \n If you dont set it, users will have to enter their own on registration."
[docs]
API_ID : Optional [ int ] = None
[docs]
API_ID__DOC = "Telegram app api_id, obtained at https://my.telegram.org/apps" + _api_txt
[docs]
API_HASH : Optional [ str ] = None
[docs]
API_HASH__DOC = (
"Telegram app api_hash, obtained at https://my.telegram.org/apps" + _api_txt
)
[docs]
REGISTRATION_AUTH_CODE_TIMEOUT : int = 60
[docs]
REGISTRATION_AUTH_CODE_TIMEOUT__DOC = (
"On registration, users will be prompted for a 2FA code they receive "
"on other telegram clients."
)
[docs]
GROUP_HISTORY_MAXIMUM_MESSAGES = 50
[docs]
GROUP_HISTORY_MAXIMUM_MESSAGES__DOC = (
"The number of messages to fetch from a group history. "
"These messages and their attachments will be fetched on slidge startup."
)
[docs]
ATTACHMENT_MAX_SIZE : int = 10 * 1024 ** 2
[docs]
ATTACHMENT_MAX_SIZE__DOC = (
"Maximum file size (in bytes) to download from telegram automatically/"
)
[docs]
BIG_AVATARS__DOC = (
"Fetch contact avatars in high-resolution (640x640) instead of the "
"default 160x160. NB: slidge core main config AVATAR_SIZE still applies."
)
[docs]
CONVERT_STICKERS = True
[docs]
CONVERT_STICKERS__DOC = (
"Convert incoming animated stickers to webm videos. "
"Requires lottie_to_webm.sh in $PATH, cf <https://github.com/ed-asriyan/lottie-converter>, "
"along with FFMPEG."
)
[docs]
CONVERT_STICKERS_EXECUTABLE = "lottie_to_webm.sh"
[docs]
CONVERT_STICKERS_EXECUTABLE__DOC = "Path to the TGS/webm converter executable."
[docs]
CONVERT_STICKERS_SIZE = 128
[docs]
CONVERT_STICKERS_SIZE__DOC = "Width and height video stickers."
[docs]
CONVERT_STICKERS_FPS = 60
[docs]
CONVERT_STICKERS_FPS__DOC = "Framerate of the video stickers"