Skip to content
UnknownShadow200 edited this page Sep 25, 2023 · 24 revisions

Introduction

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 image

Setting up a bot account

  1. Create a bot account in Developer Portal
  2. Invite the bot account to the guild/server
  3. Copy the bot account's token

See here for a more detailed guide

Note: Do not share the bot token with anyone else


Read permissions

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:

  1. Go to the Developer Portal
  2. Click on the bot in the My Applications list
  3. Click SETTINGS -> Bot in left pane
  4. Ensure that MESSAGE CONTENT INTENT is enabled image
  5. Save Changes

GUI

Go to Settings -> IRC, then tick Enable Discord integration and paste the bot token into Bot token

image

CLI

Open properties/discordbot.properties in a text editor, then set enabled to true and paste the bot token for token

image

General channels

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

image


GUI

Paste the channel ID into Channel ID (Use a comma to separate channel IDs)

image

image

CLI

Open properties/discordbot.properties in a text editor, then paste the channel ID into channel-ids

image

image

Operator channels

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


GUI

Paste the channel ID into OpChannel ID (Use a comma to separate channel IDs)

image

image

CLI

Open properties/discordbot.properties in a text editor, then paste the channel ID into op-channel-ids

image

image

Controller users

You can allow certain users to execute in-game commands from Discord

To add a controller user:

  1. Right click the user on Discord and then click Copy ID

image

  1. In-game type /DiscordControllers add [user id]

Controller users can execute in-game commands from Discord by either

  1. Typing .x [command] [arguments] on a General or Operator channel

image

  1. DMing the bot account [command] [arguments]

image

This page is still a draft - remaining work

Adjusting messages

replacements.txt stuff

Advanced stuff

Extra options available by editing properties/discordbot.properties in a text editor

Misc options

Presence options

Clone this wiki locally