Skip to content

How to get a token and channel ID for Discord

ChrisLewisAG edited this page Dec 31, 2018 · 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.
Screenshot

Give the application a name, this should be the name you want your bot on Discord to have.
Screenshot

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
Screenshot

From here you can Reveal and Copy the Token which is needed for the config file Screenshot

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://discordapp.com/oauth2/authorize?client_id=CLIENT_ID&scope=bot&permissions=3072

Screenshot

Get the channel ID of the Discord text channel

On Discord, open your User Settings -> Appearance -> Enable Developer Mode.
Screenshot

Rightclick on the Discord text channel you want the bot to interact with and press "Copy ID".
Screenshot

Insert the token into the ChikachiDiscord config 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 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],
You can’t perform that action at this time.