Skip to content

epfl-dojo/votbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VotBot

VotBot Logo

VotBot is a Telegram bot to organize votes. It is special in two points:

  1. It can take a Trello Card List json URL in parameter (see details);
  2. It's stateless: all data are stored in the chat itself (see operation chart).

Run the bot

  • Use make to build votbot executable
  • Export your Telegram Bot Token before running the executable:
    export BOT_TOKEN=123456789:THISISATELEGRAMBOTTOKEN_@botfather; ./votbot

Usage

  • Talk to the bot ;
  • Create a new vote:
    /newvote https://raw.githubusercontent.com/epfl-dojo/votbot/master/minimal.json
  • Do your vote ;
  • Close the vote:
    1. Reply the following to the vote message
    2. /close

Minimal JSON

If you do not want to use a trello cards lists json url, you can use any json file with, at least, these attributes:

{
    "name": "Name of the vote",
    "cards": [
        {
            "name": "First vote option"
        },
        {
            "name": "Second vote option"
        },
        {
            "name": "Third vote option"
        }
    ]
}

An example stands here: https://raw.githubusercontent.com/epfl-dojo/votbot/master/minimal.json

Screenshot

Screenshot

Operation Chart

Operation Chart

How to use the bot with Trello

  1. Open your Trello board
  2. Add .json to its URL
  3. Find the list ID you need (ctrl+f)
  4. Use api.trello.com/1/lists/[idList] link
  5. Add this query string: ?fields=name&cards=open&card_fields=name,url
  6. Talk to @votbot and use /newvote URL

At epfl-dojo we use