Git Product home page Git Product logo

matrix-poll-bot's Introduction

Poll Bot

Matrix bot to do polls. What more do you need?

image

Note that this bot is a proof of concept and it's unlikely I'll do any work on it in the future. I'm happy to review and merge PRs though.

Build

git clone https://github.com/babolivier/matrix-poll-bot.git
cd matrix-poll-bot
go build

Run

./matrix-poll-bot --config /path/to/config.yaml

Configure

See config.sample.yaml.

Docker

git clone https://github.com/babolivier/matrix-poll-bot.git
cd matrix-poll-bot
docker build -t matrix-poll-bot .
# Add a file named 'config.yaml' to /path/to/config/dir
docker run -v /path/to/config/dir:/data matrix-poll-bot
# For an automatic start on system boot, use this:
docker run --restart=always --name=matrix-poll-bot -d -v /path/to/config/dir:/data matrix-poll-bot

Usage

  1. Create a user for PollBot - a non-admin user is sufficient
/usr/local/bin/matrix-synapse-register-user <pollbot-user> <pollbot-password> 0
Sending registration request...
Success!
  1. Create an access token for the PollBot
curl --data '{"identifier": {"type": "m.id.user", "user": "<pollbot-user>" }, "password": "<pollbot-password>", "type": "m.login.password", "device_id": "PollBot", "initial_device_display_name": "PollBot"}' https://matrix.<your-matrix-server>/_matrix/client/r0/login
{
    "access_token": "",
    "device_id": "PollBot",
    "home_server": "<your-matrix-server>",
    "user_id": "@<pollbot-user>:<your-domain>",
    "well_known": {
        "m.homeserver": {
            "base_url": "https://matrix.<your-domain>/"
        }
    }
}
  1. Invite PollBot in the room you want to create polls
/invite @pollbot:<your-domain>
  1. Create a poll
!poll <your-question>
<emoji-1> Answer 1
<emoji-2> Answer 2
<emoji-3> Answer 3
<...>

End-to-end encryption

This bot doesn't have native E2EE support. If you want to use it in encrypted rooms, the easiest option is probably to run it through pantalaimon.

matrix-poll-bot's People

Contributors

babolivier avatar marcogabriel avatar turt2live avatar

Stargazers

 avatar

Watchers

 avatar

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.