A Discord bot for use of GSS (Gildia Skrybów Staszka) written in Discord.js framework
-
Create a file called
.env
-
Go to Discord Developer Portal
-
Create a bot by clicking
New Application
-
In
General Information
tab copyAPPLICATION ID
and fill in.env
withCLIENT_ID=<APPLICATION ID>
-
In
Bot
tab copy theTOKEN
and fill in.env
withTOKEN=<TOKEN>
-
In
OAuth2 -> URL Generator
check required accesses (probably just check all) and generate an url to invite the bot to your testing server -
Create a testing server in Discord and setup it to simulate GSS server (proper channels, roles, etc.)
-
Invite the bot using the link generated in step 6 and grant it an admin role
-
Get the ID of the server and fill in
.env
withGUILD_ID=<SERVER ID>
. To get ID of the server:
To get the server ID for the first parameter, open Discord, go to Settings → Advanced and enable developer mode.
Then, right-click on the server title and select "Copy ID" to get the guild ID
- Run
node deploy-commands.js
if commands have changed - Run
npm start
to start the bot
Deployment of the bot is currently being done manually by the owner with no plans to automate in near future - reach out to him if you want to work on automating it
- https://discordjs.guide/ - Very well written Discord.js documentation