This project connects the match info site of a participating team of the Software Challenge with a Discord webhook. If a new game result is detected, then the result is send to the webhook. A curtain role will also be pinged.
The message will look like this:
The config is a simple config.json file in the root directory. The config should look like this:
{
"matchOverviewUrl": "https://contest.software-challenge.de/seasons/.../contestants/.../matches"
"webhookUrl": "https://discord.com/api/webhooks/.../..."
"pingedRoleId": "...",
"intervalMs": 900000,
"discordUserToken": "...",
"discordChannelRequestUrl": "https://discord.com/api/v9/channels/.../messages",
"adminId": "..."
}
matchOverviewUrl
is the url of the contestant's matches that should be looked atwebhookUrl
is the url of the Discord webhookpingedRoleId
is the id of the role that should be pinged in the alert messagesintervalMs
is the time in milliseconds between each refreshdiscordUserToken
is the token of a Discord user account that is a member of the offical Software Challenge Discord serverdiscordChannelRequestUrl
is the Url to the messages Discord api endpoint for the channel in which new results are announcedadminId
is the id of the admin of the Discord server to which the webhook belongs
Before running the project you have to install the required npm packages by running npm install
.
You also have to create a config like just explained.
After that can the project be run with node src/main.js
from the root directory.
I developed the project with Node.js v22.14.0
and npm 10.9.2