A simple gateway that can transform requests sent by the Thrall Wars Utilities mod from a HTTP GET request into a HTTP POST request for discord.
You can find more info here in our wiki.
Docker is the simplest way to run the gateway. By default, it comes without HTTPs, but Let's Encrypt can easily be added via the certbot nginx image.
To run it, you will have to have Docker installed in your server.
Follow these steps:
git clone https://github.com/Nia292/webhook-gateway.git
cd webhook-gatway
docker compose -f docker-compose.deploy.yaml up -d
And the gateway is now running on port 3000!
If you do not want to bother installing Docker, you can just install NodeJs. Grab the latest LTS release, install it, and then follow these steps:
git clone https://github.com/Nia292/webhook-gateway.git
cd webhook-gatway
node gateway.js
And your gateway will be running on port 3000.
You can also use this gateway for RPR Webhooks. It will forward RPR messages to discord with the following pattern as
a message:
[<channel>][<character>] <written message>
For privacy reasons, not all channels are actively pushed. Instead, you have to manually specify which channel needs to be pushed.
A docker compose file is provided again:
git clone https://github.com/Nia292/webhook-gateway.git
cd webhook-gatway
docker compose -f docker-compose.deploy-rpr.yaml up -d
And the gateway starts with only the global chat forwarded, active on port 3000
If you do not want to bother installing Docker, you can just install NodeJs. Grab the latest LTS release, install it, and then follow these steps:
git clone https://github.com/Nia292/webhook-gateway.git
cd webhook-gatway
MONITORED_RPR_CHANNELS='1' RPR_ENABLED='true' node gateway.js
And the gateway starts, active on port 3000.
Now that your gateway is running, you will need to configure RPR.
- Create a webhook for the channel you want the webhook to go to: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
- You should have a webhook URL like this:
- Now build your URL for RPR with the following pattern:
http://<server-ip>:3000/rpr-proxy/<everything after /webhooks/>
With that URL, you can now go into your RPR settings, under webhooks, and paste the webhook URL there. Activate the webhook feature and you are good to go.