Easily replicate consistent telegram bot structure and functionality with this Telegram bot template.
Restricted Access to the Bot Using a Whitelist/Blacklist
MySQL Database Connection for User Data
Logger Handles Console and File Logging
-
Ensure that you have Python 3.9+ install on your machine. If not, you can install it here.
-
Add additional functionality to the bot by customizing the template.
-
Modify the database_schema file to reflect your desired user data/configuration.
-
Add your new commands to bot_commands.txt.
-
Set config variables in tg_config.py file and db_config.py file
-
Install pip packages
pip install -r requirements.txt
-
Run the Telegram bot from the entrypoint
python main.py