Link: covid19italtreportbot
[it] Bot Telegram che fornisce dettagliati aggiornamenti giornalieri riguardo la situazione covid-19 in Italia (contagi, morti, guariti, ...)
[en] This Telegram bot provides daily and detailed updates about covid-19 situation in Italy
- /start: It return a generic start message (every distinguished bot has one! 🧐)
- /help: It return the help message with all available commands (and which permission is required for each)
- /day: It return the covid19 report with the lastest data provided by Italian Government
- /vax: It return the vaccines report with the lastest data provided by Italian Government
-
/addme register yourself in database to receive daily updates
-
/delme delete yourself from database
-
/addgroup register your group id in database (admin-only)
-
/delgroup delete your group id in database (admin-only)
-
/vaccines and /unvaccines to start/stop the scheduler
-
/sys get server information like CPU usage etc.
- I copied this feature from @Squirrel-Network HERE
QuickStart guide to run the bot. DISCLAIMER: I tested this bot only on macOS and Linux
- Install dependencies
pip install python-telegram-bot
pip install requests
pip install db-sqlite3
pip install psutil
- Create database by running
tests/sql_script_create.py
and move the new createdGroups.db
into bot folder; - Edit
bot/config.py
with your settings; - (Optional) Customize commands output by editing
strings.ini
; - Run the bot with
python3 bot.py
- NOTE: Windows does not support emoticon and (ò, à, è) characters in strings.ini (I used macOS), you have to rewrite it!
- commands
- admin-only commands
- user commands
- dialogs
- welcome function when bot is added to groups
- errors
- console log messages
- error messages sent to admins
- function
- database and messages generic functions
- plugins
- covid19 data processing
- vaccines data processing
- utils
- check permissions of commands
HELP! My scrips work, but they are not so good and fast, if you want you can to contribute to make them better and faster!
(2020) The daily report function is controlled by plogins/covid19_script.py
. I created a Class that through requests gets data from Protezione Civile and with plogins/covid19.py
compose the message (/day)
I also created a separated package here https://github.com/mik3sw/Covid-19-Italy, you can import it in your python code.
(2021) I also created a daily report about vaccines in Italy: this function is controlled by plogins/vaccines_script.py
. I created a Class that through requests gets data from Protezione Civile and with plogins/vaccines.py
compose the message (/vax)