You can specify multiple users, as the value in YAML is a list. When the list is left empty everyone will be able to access the bot. Token: your-telegram-bot-token Restricting access to bot commandsīot can be restricted to allow only specific users to execute bot commands via telegram - allowed_usernames value in configuration YAML. Most basic custom YAML can contains only Telegram bot token: This can be especially useful when running the bot in a Docker container. This way you can provide your own Telegram bot token without modifying project files. Only specific parameters can be configured in the custom file.Īll parameters missing from custom YAML will be taken from default YAML instead. Values from the default file can be overwritten by a custom YAML file, which path can be supplied by CUSTOM_SETTINGS_PATH environment variable. Configuration Bot parametersĬonfiguration parameters for the bot are stored in a configuration YAML file.ĭefault parameters are stored in settings.yml file in the project root.ĭetailed description of each parameter is described there.Īlmost all fields are filled with sensible defaults, except the Telegram bot token. This bot was built with Python 3.10 and python-telegram-bot.įull list of Python requirements is in the requirements.txt file, you can use it to install all of them. Detecting when user blocks the bot and clearing chat data.Randomness in delays and checking for updates.A simple Telegram bot sending updates for RSS feeds, build with python-telegram-bot! Table of contents
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |