Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

How to get a token and channel ID for Discord

Cat Core edited this page Jun 14, 2021 · 6 revisions

This short guide describes how to get a token and channel ID for Discord in a few steps.

Create an application in Discord's system

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

Add your new Discord bot user to your Discord server/guild

Under the General Information tab, you can see a "Client ID". Replace CLIENT_ID in the following URL and go to the page. https://discord.com/oauth2/authorize?client_id=CLIENT_ID&scope=bot&permissions=3072

Get the channel ID of the Discord text channel

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".

Insert the token into the config file on the Minecraft server

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.

Snippet example of config file

There are 2 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 ones on line 4 and 5 if using Notepad++) and looks like this around it

   "chatChannels": [],
   "logChannels": [],   

the channel ID needs to be added as follows.

 "chatChannels": [
   "559063331667836930"
 ],
 "logChannels": [
   "559063331667836930"
 ], 

Note : A logChannel is not required for the mod to work