Skip to content

A dockerized telegram bot to automate signing ministry of education covid certificates

Notifications You must be signed in to change notification settings

chorin1/autocovid

Repository files navigation

Autocovid

A dockerized telegram bot to automate signing ministry of education covid certificates.

Setup

Short version

  1. Create a new telegram bot.
  2. Make sure you are using a password to enter MOE parents portal (not by SMS).
  3. git clone, docker build and docker 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

Long(er) version

  1. Create a bot using telegram's botfather.

    1. Use /setcommands in botfather to add /sign and /hello commands to your new bot.
    2. Optionally, /setname and /setuserpic to make the bot more appealing.
    3. Add your new bot to a private channel.
  2. 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.

  3. Set up a new VM instance with docker (currently AWS & GCP have free-tiers with VM instances).

  4. Clone this repo to the new set up instance.

  5. 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
    
  6. Run the following commands:

    sudo docker build --tag autocovid .
    sudo docker run --env-file=.env --name whatever --detach --restart=always autocovid
    

About

A dockerized telegram bot to automate signing ministry of education covid certificates

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published