telegramlib.commands¶
Telegram Bot Command Module¶
This module provides functionality for defining and handling default commands within a Telegram bot. It includes decorators to restrict access to certain commands based on user roles and functions to perform specific actions such as executing terminal commands, managing user follow lists, sending messages, and banning users.
Usage¶
To make these commands usables, it is necessary to add them to the command list during bot start in start_bot function.
Functions
|
Decorator to restrict command execution to the bot's admin. |
|
Bans specified users from the bot. |
|
Ends the conversation with the bot's creator. |
|
Decorator to restrict command execution to users listed as controllers. |
|
Initiates a direct conversation with the bot's creator. |
|
Adds users to the admin's list of followed users. |
|
Unbans all or specified users from the bot. |
|
Executes terminal commands as the admin. |
|
Removes users from the admin's list of followed users. |
|
Sends a message to a specified user from the admin. |