-
Notifications
You must be signed in to change notification settings - Fork 9
Setup
The README provides a guide on setup, which is duplicated and explained in further detail here.
- 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.
- 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.
- 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
-
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. -
Enable mod security and add
discordmt
to the HTTP mods. In additon, setdiscord.port
in yourminetest.conf
to match the port you used inrelay.conf
and optionally setdiscord.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.)
- 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.
- 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.
discordmt
Wiki is licensed under the MIT License.