Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/okuuva/civ2disgord
Convert turn notifications from Civilization VI Play by Cloud into a format Discord understands
https://github.com/okuuva/civ2disgord
Last synced: 15 days ago
JSON representation
Convert turn notifications from Civilization VI Play by Cloud into a format Discord understands
- Host: GitHub
- URL: https://github.com/okuuva/civ2disgord
- Owner: okuuva
- License: mit
- Created: 2019-07-08T05:40:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-01T10:03:55.000Z (about 5 years ago)
- Last Synced: 2023-03-01T02:16:18.350Z (over 1 year ago)
- Language: Go
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# civ2disgord
A little script that helps Civilization VI and Discord understand each other by converting turn notifications from
Civilization VI Play by Cloud into the format used by Discord webhook bot. Not only that, but it can do it in a way
that pings the user with their Discord handle instead of just shouting the Steam nick.## Building
If you want to build the standalone script, run
```
go build main.go logging.go checkers.go cmdline.go -o civ2disgord
```For running it in AWS Lambda, run
```
go build awslambda.go logging.go checkers.go cmdline.go -o civ2disgord
```## Running
When called, the script converts the JSON message from Civ VI PbC into a Discord webhook message and sends it to the
said webhook. The message is provided by CLI argument. Mappings (Steam nick -> Discord ID, Game name -> webhook url)
can be read from either YAML config file or environment variables. Sample configuration file can be found from
[config.yml](./civ2disgord/config.yml).Env variable keys need to be base64 encoded in order to support all the funky character people have on their Steam nicks.
In order to make the conversion less painful, you can convert valid config file into environment variables by providing
config file and running the script with `--to-env` flag. The output is in .env file format and is printed to the stdout.
Check `civ2disgord --help` for all the CLI flags.Currently the standalone script only supports oneshot conversions, i.e. it needs to be called separately each time
you need to convert and send messages to Discord. Daemon mode is on the TODO-list, pull-requests welcome.## TODO
* Daemon mode for the standalone script
* Google App Engine script similar to awslambda.go
* makefile for easier builds