redfellow / civ-handler-public

Handles webhook messages from Civ 6 and sends them to Discord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

civ-handler

Handles webhook messages from Civ 6 and sends them to Discord. Civ VI sends three values and you can only set a single endpoint to push the turn notifications in a Play By Cloud game. This app sits between Discord and Civ and redirects the POSTed messages to different Discord Webhooks based on partially matching the game name to a webhook. It also prevents the same turn notification from triggering multiple times.

Offers a log.html to view sent events and to display errors such as duplicate events.

known limitations

install

Clone the repo and run npm install

configure

Add your games partial name, app port and steam nick to discord nick mappings into server.js Add your server URL to Civ 6 webhook options Note: From personal testing it would appear URLs with port number (eg :8080) just don't work. Even then, Civ takes it's sweet time to start pushign to the webhook and it still it doesn't happen always.

run

Run the script with node server.js. I use forever to make sure the script stays up.

troubleshooting

Paradox has not stated what kind of servers work and what don't. From my testing, port number or https in the url doesn't work. I'm using something like http://www.mydomain.com/civ/new_turn and it worked after I started a new game with said hook enabled for every turn.

Don't use hooks if you have people playing with MacOs though, their game will crash after each turn. Aspyr knows about the bug, but hasn't patched it for a year now (and counting).

About

Handles webhook messages from Civ 6 and sends them to Discord

License:MIT License


Languages

Language:HTML 51.8%Language:JavaScript 47.4%Language:Batchfile 0.8%