-
Notifications
You must be signed in to change notification settings - Fork 83
Discord relay bot
MCGalaxy includes a built-in Discord relay bot which allows you to:
- Send in-game chat to Discord
- Send Discord chat to in-game
- Run in-game commands from Discord
This guide will explain how to setup and configure the Discord relay bot
Note: You should enable Developer Mode in User Settings -> App Settings - you'll need this later
- Create a bot account in Developer Portal
- Invite the bot account to the guild/server
- Copy the bot account's token
See here for a more detailed guide
Note: Do not share the bot token with anyone else
Discord prevents bots from reading the contents of messages sent from Discord unless the Message Content Intent
permission has been enabled in their bot account settings
To enable the Message Content Intent
permission in bot account settings:
- Go to the Developer Portal
- Click on the bot in the My Applications list
- Click
SETTINGS -> Bot
in left pane - Ensure that
MESSAGE CONTENT INTENT
is enabled - Save Changes
Go to Settings -> IRC, then tick Enable Discord integration
and paste the bot token into Bot token
Open properties/discordbot.properties in a text editor, then set enabled
to true and paste the bot token for token
You can specify one or more Discord channels to treat as general channels
- Anyone can type
.who
to see a list of online players - All general in-game chat will be sent to these channels
- Any messages sent to these channels will appear in-game
Right click the channel, then click Copy ID
Paste the channel ID into Channel ID
(Use a comma to separate channel IDs)
Open properties/discordbot.properties in a text editor, then paste the channel ID into channel-ids
You can specify one or more Discord channels to treat as operator channels
- Anyone can type
.who
to see a list of online players - All staff-only chat (e.g. /opchat) will be sent to these channels
- Any messages sent to these channels will be appear in-game as /opchat messages
Right click the channel, then click Copy ID
Paste the channel ID into OpChannel ID
(Use a comma to separate channel IDs)
Open properties/discordbot.properties in a text editor, then paste the channel ID into op-channel-ids
You can allow certain users to execute in-game commands from Discord
To add a controller user:
- Right click the user on Discord and then click
Copy ID
- In-game type
/DiscordControllers add [user id]
Controller users can execute in-game commands from Discord by either
- Typing
.x [command] [arguments]
on a General or Operator channel
- DMing the bot account
[command] [arguments]
replacements.txt stuff
Extra options available by editing properties/discordbot.properties in a text editor