You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.1 KiB
Markdown
53 lines
2.1 KiB
Markdown
4 years ago
|
## Description
|
||
|
Matrix Room: https://matrix.to/#/#snowstorm-matrix:imninja.net
|
||
|
|
||
|
This bot will send news about Blizzard games to Matrix room they got invited to.
|
||
|
It will additionally alert an admin room about missing bots.
|
||
|
|
||
|
Information about which URLs already got posted is also saved into the admin room via state events.
|
||
|
|
||
|
|
||
|
## Configuration
|
||
|
First create all users you want to use. All usernames must be `MXID_PREFIX+<game>` (e.g. `snowstorm_worldofwarcraft`). `MXID_PREFIX` is by default `snowstorm_`
|
||
|
|
||
|
Next you have to create a new room you can use as admin room. You have to specify the room id of that room later. Invite all bot users to that room.
|
||
|
Additionally you have to allow every user to post to the cache state:
|
||
|
```json
|
||
|
"de.lubiland.de.snowstorm-matrix.cache": 0
|
||
|
```
|
||
|
|
||
|
Additional bot users can be added via register -> invite to admin room -> access token file.
|
||
|
|
||
|
## Running it
|
||
|
After initial configuration you can run it manually:
|
||
|
```bash
|
||
|
docker run --rm \
|
||
|
-v $(pwd)/heroesofthestorm:/heroesofthestorm:ro \
|
||
|
-v $(pwd)/worldofwarcraft:/worldofwarcraft:ro \
|
||
|
-e ADMIN_ROOM='!iesofojasief90429ewiofj:matrix.org' \
|
||
|
-e ACCESSTOKEN_HEROESOFTHESTORM_FILE=/heroesofthestorm \
|
||
|
-e ACCESSTOKEN_WORLDOFWARCRAFT_FILE=/worldofwarcraft \
|
||
|
snowstorm-matrix
|
||
|
```
|
||
|
|
||
|
Or via docker-compose/swarm:
|
||
|
```yaml
|
||
|
snowstorm-matrix:
|
||
|
image: snowstorm-matrix
|
||
|
deploy:
|
||
|
replicas: 1
|
||
|
secrets:
|
||
|
- snowstorm-matrix_heroesofthestorm
|
||
|
- snowstorm-matrix_insideblizzard
|
||
|
- snowstorm-matrix_overwatch
|
||
|
- snowstorm-matrix_worldofwarcraft
|
||
|
environment:
|
||
|
- HOMESERVER_URL=http://synapse:8008
|
||
|
- HOMESERVER_NAME=matrix.org
|
||
|
- ADMIN_ROOM=!jjpPluoxZoAOBQeYer:imninja.net
|
||
|
- ACCESSTOKEN_HEROESOFTHESTORM_FILE=/run/secrets/snowstorm-matrix_heroesofthestorm
|
||
|
- ACCESSTOKEN_INSIDEBLIZZARD_FILE=/run/secrets/snowstorm-matrix_insideblizzard
|
||
|
- ACCESSTOKEN_OVERWATCH_FILE=/run/secrets/snowstorm-matrix_overwatch
|
||
|
- ACCESSTOKEN_WORLDOFWARCRAFT_FILE=/run/secrets/snowstorm-matrix_worldofwarcraft
|
||
|
```
|