Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/babolivier/matrix-poll-bot
Matrix bot to do polls
https://github.com/babolivier/matrix-poll-bot
Last synced: about 6 hours ago
JSON representation
Matrix bot to do polls
- Host: GitHub
- URL: https://github.com/babolivier/matrix-poll-bot
- Owner: babolivier
- License: agpl-3.0
- Created: 2019-06-26T19:37:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-06T15:28:40.000Z (almost 4 years ago)
- Last Synced: 2024-06-20T17:49:32.951Z (5 months ago)
- Language: Go
- Size: 25.4 KB
- Stars: 46
- Watchers: 4
- Forks: 13
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-technostructure - babolivier/matrix-poll-bot - poll-bot: Matrix bot to d ([✨ inspiration](https://github.com/stars/ketsapiwiq/lists/inspiration))
- awesome-technostructure - babolivier/matrix-poll-bot - poll-bot: Matrix bot to d ([✨ inspiration](https://github.com/stars/ketsapiwiq/lists/inspiration))
README
# Poll Bot
Matrix bot to do polls. What more do you need?
![image](https://user-images.githubusercontent.com/5547783/60209177-029b8e80-9852-11e9-8aee-c91d7ccaaec1.png)
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
```bash
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](/config.sample.yaml).
## Docker
```bash
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 0
Sending registration request...
Success!
```2. Create an access token for the PollBot
```
curl --data '{"identifier": {"type": "m.id.user", "user": "" }, "password": "", "type": "m.login.password", "device_id": "PollBot", "initial_device_display_name": "PollBot"}' https://matrix./_matrix/client/r0/login
{
"access_token": "",
"device_id": "PollBot",
"home_server": "",
"user_id": "@:",
"well_known": {
"m.homeserver": {
"base_url": "https://matrix./"
}
}
}
```3. Invite PollBot in the room you want to create polls
```
/invite @pollbot:
```4. Create a poll
```
!poll
Answer 1
Answer 2
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](https://github.com/matrix-org/pantalaimon).