Configs¶
BotConfig
¶
Bases: SubConfig
Sub-config with Telegram bot configuration.
Attributes:
| Name | Type | Description |
|---|---|---|
owner |
int
|
Telegram ID of the bot's owner. |
api_id |
int
|
Telegram API ID for client registration. |
api_hash |
str
|
Telegram API hash for client registration. |
bot_token |
str | None
|
Telegram bot token. Bot operates in user-bot mode if |
workers |
int
|
Number of Pyrogram workers to use. |
max_concurrent_transmissions |
int
|
Max number of concurrent transmissions. |
scoped_commands |
bool
|
Whether scoped commands should be used instead of a simple permissions model. |
from_dict(data)
classmethod
¶
Config
¶
Bases: FileConfig
Bot's primary configuration that includes all sub-configs.
Attributes:
| Name | Type | Description |
|---|---|---|
locale |
str
|
Bot's locale in Telegram-compatible format. |
bot |
BotConfig
|
Sub-config with bot's configuration. |
reports |
ReportsConfig
|
Sub-config with report configuration. |
disabled_plugins |
list[str]
|
List with plugin names that must not be enabled. |
commands |
dict[str, dict[str, list[dict[str, Any]]]]
|
Full mapping with commands to be loaded. Check the examples directory for examples. |