An easy-to-use relay complete with login and command support, using an external program written in Python.
GitHub | Direct link to latest release (.zip) | Wiki
Licensed under MIT
Have you ever wanted to interact with and moderate your server without logging into the game (or IRC)?
Do you have an active community on Discord which you'd like to bridge to Minetest?
Are you unsatisfied with the features or long installation steps of the current Discord relays?
If you answered YES to any of these questions, discordmt is for you!
Setup
1. Download or clone the repository.
2. Create an application at the Discord Developer Dashboard and enable it as a bot (in the Bot tab.) For a more detailed guide on creating Discord bots, see this bot setup guide by reactiflux. Make sure you check the box to enable the Message Content intent.
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. The ID of the channel you wish to relay to must also be specified in relay.conf; you may obtain it by enabling Developer Mode on the Discord client and rightclicking the desired channel in the list.
Example relay.conf: (The token shown below has been regenerated)
Code: Select all
[BOT]
token = NjEwODk0MDU4ODY4NzAzMjMz.XVL5dA.8j8d2XN8_5UwRheG91P2XksYDoM
command_prefix = !
[RELAY]
port = 8080
channel_id = 576585506658189332
allow_logins = true
clean_invites = true
use_nicknames = true
5. Enable mod security and add discordmt to the HTTP mods. In addition, set "discord.port" in your minetest.conf to match the port you used in relay.conf and optionally set "discord.text_color" to a hex color string if you'd like to color relayed messages from Discord.
Example minetest.conf excerpt:
Code: Select all
secure.enable_security = true
secure.http_mods = discordmt
discord.port = 8080
discord.text_color = #a7a7a7
6. 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.
Logging in and running commands
Discord users may log in by using the !login <username> [password] command in DMs (Direct Messages) with the bot. This command should never be used outside of DMs.
Once a user is logged in, they may run commands with !cmd <command name> [command params] in either the relay channel or DMs with the bot.
Additional information
- Logins persist while the relay is up; users do not need to relogin after the Minetest server alone restarts.
- The relay program should be running if you start a Minetest server with `discordmt` enabled; otherwise harmless but annoying 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. Optimally, you should run a separate relay and bot for each Minetest server.
Thank you for using discordmt!