Skip to content

SturmEnte/socha-discord-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SoCha Discord Integration

About

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:

image

Config

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 at
  • webhookUrl is the url of the Discord webhook
  • pingedRoleId is the id of the role that should be pinged in the alert messages
  • intervalMs is the time in milliseconds between each refresh
  • discordUserToken is the token of a Discord user account that is a member of the offical Software Challenge Discord server
  • discordChannelRequestUrl is the Url to the messages Discord api endpoint for the channel in which new results are announced
  • adminId is the id of the admin of the Discord server to which the webhook belongs

Setup

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published