-
Notifications
You must be signed in to change notification settings - Fork 4
Configuring a Discord bot
This page will help you create a Discord bot and configure Discord Integration to use it.
Please enable the server with this plugin at least once before following the rest of this tutorial, so the config.yml and messages.yml are created. You can also configure the plugin when it's enabled and the server is on, just remember to run /di reload
.
Note: Do not use tabs in config.yml or messages.yml and use spaces instead. Otherwise the config won't load
- Go to https://discord.com/developers/applications
- Click New application, choose a fitting name and click Create
- Open the Bot tab, then set the icon and name of the bot. Members of your server will be able to see them
- Enable Server members intent and Message content intent below:
- Copy the bot token from this page and paste it in the config.yml file as the
discord-token
field, like so:
# (...)
discord-token: PASTE.YOUR.TOKEN.HERE
# (...)
- Open the OAuth2/URL Genrator tab
- Pick
bot
andapplications.commands
in scopes
- In the Bot Permissions box, select
Administrator
. You can also manually select all the scopes the bot should have, but this might prevent the bot from working
- Copy the authorization URL
- Open the URL in your browser. Pick a server to add the bot to and click Continue
(pretend this is in English)
-
Confirm the scopes and click Authorize
-
Open Server Setting/Roles
-
Move the bot role to the top
- Right click on the channel you want to sync
- Click Copy Link (you can also click Copy ID, if you have Developer Mode enabled)
- Paste the ID or link in the
chat.channels
list
# (...)
chat:
channels:
- PASTE_YOUR_CHANNEL_ID_OR_LINK_HERE
# (...)
- Repeat for every channel you want to sync
You need to create webhooks in order for the Minecraft chat messages to be shown on Discord
- Click Edit channel on the channel you want to receive Minecraft messages on
- Click on the Integrations tab and click View Webhooks
- Click New Webhook
- Pick the channel
- Pick a name and icon
- Click Copy Webhook URL
- Paste the webook in the
chat.webhooks
list
# (...)
chat:
channels:
- 814059044134322189
webhooks:
- https://discord.com/api/webhooks/839784039262191627/IYYJo-lXjiyNopEYUwuBAFThIsiSfaKeUTLCgsechCy-31bpkItTeNSSab7iEsA7xDD
# (...)
- Repeat for every channel you want to add
- If your server is set to offline mode (cracked), set
chat.avatar.offline-mode
totrue
Finally you can type /di reload
. You should see this message: Discord Integration connected