An easy-to-use relay complete with login and command support, using an external program written in Python.
GitHub | Releases | 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!
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 on creating Discord bots, 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. 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 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 in either the relay channel or DMs with the bot.
- Logins persist while the relay is up; users do not need to relogin after the Minetest server alone restarts.
- The relay program must be running if you start 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.
Thank you for taking the time to read my wall of text, and feel free to reply or otherwise contact me if you have any issues using the relay.