Skip to content

Simple telegram bot to remind about the daily stand up

License

Notifications You must be signed in to change notification settings

sapumar/dailybot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maintainability License MIT Open issues Gitter

Daily Bot

Deploy

This is a simple bot to remind Telegram groups about it's daily standup. It runs from monday to friday, but can run on different days too if you'd like.

Setting up

I'm assuming you already have Python 3.6 and a bot token (if you don't, here's a good link)

Firstly, you have to set the following variables to your environment:

  • NAME - the bot's name;
  • TOKEN - the bot's token;
  • CHAT_ID - the chat with which the bot will send the daily messages
  • HOUR - the hour that the bot will send the daily message
  • MINUTE - the minute of the hour mentioned above that the bot will send the daily message
  • PORT - only used if you're using ngrok or Heroku (and Heroku fills this variable automatically)

Now, you might be asking, how do I set variables? Well, it's a simple command (for linux, of course), see below for CHAT_ID.

export CHAT_ID=-98364829374

After you set all variables, create a virtual environment (or not) and install all dependencies with

pip install -r requirements.txt

And run the bot script

python dailybot.py

Changing default messages

All message templates currently reside on msg folder, by editing those markdown files you're editing what the bot is saying.

Brief overview of the files:

  • start.md - Template for start message command
  • daily.md - Template for daily message
  • example.md - Template for an example of a proper daily message
  • error.md - Template for error message when bot wasn't properly configured