For those running onilne tournaments, this is a script that assigns roles to Discord server members based on (smashgg, for now) tournament registration. It will also give nicknames to server members if their Discord usernames don't match their smashgg gamertags.
- Node.js 12 or newer
- A smash.gg API token
- A Discord bot token that has the following permissions on your server:
Manages Roles
Manage Nicknames
-
Create a
credentials.json
file with these tokens. Usecredentials.example.json
as a reference. -
Create a
config.json
file that contains your Discord server ID, and a mapping from Discord role ID to either smash.gg game ID or the game name. Useconfig.example.json
as a reference. -
npm ci
-
npm start -- [smashgg tournament slug]