Git Product home page Git Product logo

votbot's Introduction

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

votbot's People

Contributors

gcmalloc avatar ponsfrilus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

votbot's Issues

Voting options per ballot

For now, ballot options are defined for each instance of the bot, with SINGLE_VOTE and SECRET_VOTE. I think it would be useful to be able to define these options at the /newvote command and be able to have different vote features for each ballots.

A voter can vote more than once...

...for the every entries ! If SINGLE_VOTE is set to false, one can increment his vote for the every elements
bug_votbot:

Beside the fact it can be a feature (:scream:), this is not the first expected behaviour.

Debug and log to file

  • DEBUG = true: A debug variable to get all the jam when needed.
  • LOGTOFILE = true: To get the log history per ballot in a file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.