Geiser Ping Bot#
Plain Telegram bot with miscellaneous simple features, like whoami or ping.
I'm using this as a skeleton base for any other future Telegram bots I make.
Config#
cp config.example.toml config.toml
Edit the bot_token to the actual token from your bot.
Setup and run#
Set up the environment (commands for Linux bash):
python3 -m venv .venv
source .venv/bin/activate
python -m pip install poetry
poetry install
poetry run python main.py
Questions#
Why use asyncio? The telegram library already handles signals by default.
I wrote a private discord-telegram bridge bot in the past, and the way the discord library was made, I had to use asyncio to avoid one bot holding the other forever. Since this is intended as a skeleton for other bot projects, I wanted to have this scenario covered already.