A dockerized telegram bot to automate signing ministry of education covid certificates.
- Create a new telegram bot.
- Make sure you are using a password to enter MOE parents portal (not by SMS).
git clone
,docker build
anddocker run
in your favorite cloud.
The following environment variables need to be set:
Key | Description |
---|---|
MOE_USER | MOE parent's portal username |
MOE_PASS | portal password |
TELEGRAM_TOKEN | Telegram bot token |
CHAT_ID | chat ID where signing will be enabled |
DEV_CHAT_ID | chat ID where exception will be sent to |
-
Create a bot using telegram's botfather.
- Use
/setcommands
in botfather to add/sign
and/hello
commands to your new bot. - Optionally,
/setname
and/setuserpic
to make the bot more appealing. - Add your new bot to a private channel.
- Use
-
Find your private channel's chat_id and your own chat_id where the bot will send errors to. There are many ways to do this, here's one of them.
-
Set up a new VM instance with docker (currently AWS & GCP have free-tiers with VM instances).
-
Clone this repo to the new set up instance.
-
Create a new file named
.env
. It should contain the list below (change the values with your own):MOE_USER=123456 MOE_PASS=passpass TELEGRAM_TOKEN=1222222:AABBCC CHAT_ID=1234567 DEV_CHAT_ID=123456
-
Run the following commands:
sudo docker build --tag autocovid . sudo docker run --env-file=.env --name whatever --detach --restart=always autocovid