Skip to content
archfan edited this page Jun 1, 2021 · 2 revisions

Relay Setup

The README provides a guide on setup, which is duplicated and explained in further detail here.

  1. Download or clone the repository. If you don't want to install Python and/or the dependencies for running the Python relay, take a look at the releases for binary executables.
  2. Create an application at the Discord Developer Dashboard and enable it as a bot (in the Bot tab.) For a more detailed guide, see this bot setup guide by reactiflux.
  3. Copy the token from your newly-created bot, and use it to finish setting up relay.conf along with any other settings you wish to change.

Example relay.conf: (The token shown below has been regenerated)

[BOT]
token = NjEwODk0MDU4ODY4NzAzMjMz.XVL5dA.8j8d2XN8_5UwRheG91P2XksYDoM
command_prefix = !
[RELAY]
port = 8080
channel_id = 576585506658189332
allow_logins = true
  1. Put discordmt in your Minetest mods directory. You may also run the Python relay from the mod directory, though server owners may wish to separate the two for cleanliness.

  2. Enable mod security and add discordmt to the HTTP mods. In additon, set discord.port in your minetest.conf to match the port you used in relay.confand optionally set discord.text_color to a hex color string if you'd like to color relayed messages from Discord.

Example minetest.conf excerpt:

secure.enable_security = true
secure.http_mods = discordmt
discord.port = 8080
discord.text_color = #a7a7a7

(Side note: The port must be set in both relay.conf and minetest.conf because users may decide to run the relay in a different location than the mod, or to run multiple relays/servers at once.)

  1. Run the relay and, when you're ready, the Minetest server. The relay may be left up even when the server goes down, or may run continuously between several server restarts, for maximum convenience.

Additional information

  • Logins persist while the relay is up; users do not need to relogin after the Minetest server alone restarts.
  • The relay must be up while running a Minetest server with discordmt enabled; otherwise HTTP errors will be thrown.
  • Running two Minetest servers connecting to a single relay, or multiple relays connected to a single bot, will work unexpectedly and is not recommended. You should run a separate relay and bot for each Minetest server.
Clone this wiki locally