Discord integration
WARNING
This page is outdated; it will be updated as soon as possible.
Module info | |
---|---|
Configuration | discord-integration.yml |
Manager | DiscordIntegrationManager |
Support | 1.8+ |
Free version | ❌ |
Proxy-configurable | ✔ |
ChatPlugin includes a Discord integration module which is based on JDA's libraries. It enables the Minecraft server to be synchronized with a Discord server; continue reading to know how to set it up. Here are the main and most interesting features:
- punishment messages (like warnings and mutes) are sent in real time to the specified text channel
- a notification is sent to the Staff when a player uses multiple accounts or evades a ban
- some useful commands (see the table below)
- support for beautiful embed messages (with images, too)
- every message is translatable and customizable
Integration setup
Follow these steps to create the custom Discord bot and enable the integration in your server(s):
- go to Discord Developer Portal and login with your account
- click on "New application" and choose a name (ex. "ChatPlugin Bot"), then click "Create"
- copy the application ID into your discord-integration.yml file at
bot-settings.application-id
- edit the settings as you like and go to "Bot" in the sidebar, then click the "Add Bot" button
- copy the bot's secret token into your discord-integration.yml file at
bot-settings.token
- disable the option "Public bot" in the bot's settings and save changes
- find "OAuth2" in the sidebar, then go to "Scopes" section, select "bot", "applications.commands" and click "Copy"
- paste the invitation link in your browser and choose the server you want the bot to be invited in
- go to your Discord account's settings and enable Developer mode (settings sidebar -> "Advanced")
- right click your guild's logo in the Discord app, click "Copy ID" and paste it at
bot-settings.guild-id
- (optional) choose a channel for punishment messages and put its ID at
bot-settings.channels-ids.punishments
- (optional) choose a channel for staff notifications and put its ID at
bot-settings.channels-ids.staff-notifications
- save the file and reload the plugin using /chatplugin reload, /chatpluginbungee reload or /chatpluginvelocity reload
- check if everything works by typing a command (see the commands list below)
Please note that if you are running a multiple server setup you have to enable the integration only for the proxy (which handles the network's punishments and IP lookups). Spigot instances with multi instance mode enabled cannot run it. Also, make sure to never start more than one bot at once.
Memory usage
Running a Discord is not very resource demanding and this bot is pretty lightweight, but it will use some memory (about an extra ~50 MB), so make sure your server can handle it. For example some proxy setups run on very low memory allocations (128, 256 MB) and in these cases it's recommended to increase the available RAM.
Bot's messages
Every message sent by the bot can be customized through the discord-integration.yml file. Unlike the Minecraft plugin, the bot supports only one language: it's impossible to send different messages to two users in the same text channel on Discord. Every punishment message can be disabled (for example if you want ban messages to be sent but you don't want ban expiration messages).
Remember that Discord uses a Markdown-similar syntax for text messages; you can easily find a guide about how to create bold, italic and formatted messages.
Customizing embeds
Every message in the discord-integration.yml file has default values which can be customized. Here's the first message (/chatplugin help output):
main:
help:
title:
text: Help for ChatPlugin
url: https://github.com/ChatPlugin/ChatPlugin/wiki/Discord-integration/_edit#commands-list
description: Click the title to visit the GitHub page and the ChatPlugin wiki.
thumbnail: https://i.imgur.com/9NhY4ps.png
color: 55FF55
This will produce the following:
...but you can add more properties to every message, here's the complete list:
title.text
: the text the embed's title will displaytitle.url
: turn the title into an hyperlink pointed to a URLdescription
: the actual embed's contentimage
: the image's URL for the messagethumbnail
: the thumbnail image's URL for the messageauthor.text
: displayed text about an authorauthor.url
: turn the text into an hyperlink pointed to a URLauthor.icon-url
: the displayed icon's URL for the authorfooter.text
: displayed text in the message's footerfooter.icon-url
: the displayed icon's URL for the footercolor
: message's side's color in hex format without#
Commands list
Here is the list of all available commands for the Discord bot. More will be added over time.
Command | Recommended rank | Description |
---|---|---|
/chatplugin | user | ChatPlugin's main command. |
/chatplugin help | user | Show help about the commands. |
/chatplugin reload | admin | Reload the Discord integration. |
/chatplugin status | mod | Display current server/network status. |
/chatplugin version | user | Display current plugin and JDA version. |
/chatplugin info | user | Show useful info about the plugin. |
/banlist | mod | Show the active bans list. |
/warnlist | mod | Show the active warnings list. |
/mutelist | mod | Show the active mutes list. |
/baninfo <id> | mod | Show information about a ban. |
/warninfo <id> | mod | Show information about a warning. |
/kickinfo <id> | mod | Show information about a kick. |
/muteinfo <id> | mod | Show information about a mute. |
/iplookup <IP> | mod | Perform an IP address lookup. |
ChatPlugin - A complete yet lightweight plugin which handles just too many features!
This wiki is currently updated to version 1.9.10.
© 2024 Remigio07
Please report any mistakes and misspellings as described at Home/Reporting issues.