-
Notifications
You must be signed in to change notification settings - Fork 42
How to get a token and channel ID for Discord
This short guide describes how to get a token and channel ID for Discord in a few steps.
Go to their Developer site and create an application.
If you aren't logged in, it will send you to the login page.
Simply press on the "Create An Application" button.
Give the application a name, this should be the name you want your bot on Discord to have.
This will then allow you to create a Bot for the application this can be done by going into the Bot section on the left, and clicking Add Bot
From here you can Reveal and Copy the Token which is needed for the config file
Then scroll down to enable Server Members Intent
Under the General Information tab, you can see a "Client ID".
Replace CLIENT_ID in the following URL and go to the page.
https://discordapp.com/oauth2/authorize?client_id=CLIENT_ID&scope=bot&permissions=3072
On Discord, open your User Settings -> Appearance -> Enable Developer Mode.
Rightclick on the Discord text channel you want the bot to interact with and press "Copy ID".
If you don't have the config file, start the server with the mod installed, and it will generate a default config file.
Insert the bot token and channel ID in to the config.
There are 3 areas that need editing
First off at the top is where you add your Bot Token (Line 2 if using Notepad++)
"token": "NTI5MzI1MzY4OTAyMDI1MjI3.DwvNFQ.5aNKUvYlAKqKKq6UJ1fRiARKNXQ",
Then on the Channels section (this is the one on line 19 if using Notepad++) and looks like this around it
},
"channels": {}
}
the channel ID needs to be added as follows (This requires adding extra "{}" and a ":" to the file.
},
"channels": {
"1233456789": {
}
}
Then finally down in the minecraft section there is also another line noted as discordChannel (Line 40 using Notepad++)
"discordChannel": [1233456789],
das basicaly it poggers :)