Skip to main content

DiscordSRV Integration

EliteMobs uses DiscordSRV to enable the broadcast of announcement priority level 3 and higher messages. You can read about the Announcement Priority System here.

In essence, this means that some very special Custom Bosses are able to send messages on Discord in a way that looks like this:

discord message example

The intention is to create a dedicated EliteMobs announcement room that players can take a look at to see if there's any interesting World Bosses currently alive that they can go kill and show off that they did in the kill leaderboard.

Setting it all up

Setting up DiscordSRV​

DiscordSRV is a different plugin not developed by me. You can find their extensive setup guide here. If you have a hard time setting it up, their support room is here. I am not able to provide support for this plugin, so please refer to them for this part of the installation.

EliteMobs compiles against DiscordSRV 1.28.0. Use the test command below to verify delivery with the version installed on your server.

Setting up the EliteMobs DiscordSRV config​

Once you've correctly configured DiscordSRV (and you have to test to see if it's really working before you move to this step), the EliteMobs configuration only has 1 step.

Go to the DiscordSRV.yml configuration file in the EliteMobs configuration folder (typically plugins/EliteMobs/DiscordSRV.yml) and you will find a configuration option called announcementRoomName.

There are three values you can use for this message. I recommend #1.

  1. [Recommended] The name of the room as you configured it on the DiscordSRV configuration file. It does not matter what you called the room, only that you use the correct name. Here's an example of the room I configured to be dedicated to EliteMobs events: using name example In my case, the option should read announcementRoomName: EMEvents.

  2. The ID of the room as you configured it on the DiscordSRV configuration file. Here's an example of the room. Please note that each room is unique. I am only showing pictures as an example, do not try to copy the ID numbers. It will not work. Your setup should have a unique set of numbers based on your discord room id. using id example

  3. [Less reliable] The channel name as it appears on Discord. The fallback search is case-insensitive and takes the first matching text channel, so duplicate names can select the wrong destination. DiscordSRV and its bot still need to be configured and able to access the channel; this name lookup itself does not require a game-channel mapping.

Technical Notes​

  • Messages sent to Discord have Minecraft color codes automatically stripped to ensure proper display
  • Discord messages are sent asynchronously to prevent server lag
  • EliteMobs uses a three-tier lookup to find your Discord channel: first by channel ID (only when announcementRoomName is all digits), then by DiscordSRV's channel mapping, and finally by channel name search
  • Automatic content announcements require priority 3 or higher — this covers Custom Boss spawn/death/escape messages and Custom Event startMessage/endMessage. The manual test command below sends directly without checking a content priority.
  • The same messages shown in-game are sent to Discord
  • The channel is looked up again for every announcement, so a corrected announcementRoomName takes effect after /em reload. A lookup that finds nothing logs Channel room <name> is not valid!; a message Discord rejects logs DiscordSRV announcement failed for <name>.

Testing​

You can use the command /em discord <message> to test if your configuration is working. Replace <message> with any text you want to send to Discord.

Example: /em discord Test message from EliteMobs!

Verify that your message appears in the intended Discord channel. The command's acknowledgement only confirms an attempted send; it can appear even when DiscordSRV is missing, the setting is still the placeholder, or channel resolution fails. No message in Discord means delivery is not verified.

Note: This command requires the permission elitemobs.discord.message

Additionally, you can use /em discord (without any message) to display the EliteMobs Discord server invite link for support and downloads. This command requires the permission elitemobs.discord.link.

Troubleshooting​

Messages not appearing in Discord:

  • Verify DiscordSRV is installed and working (test with DiscordSRV's own commands first)
  • Check that announcementRoomName is NOT set to the default placeholder value
  • Ensure the room name/ID matches exactly what's in your DiscordSRV configuration
  • Check console for EliteMobs warnings about Discord integration
  • Verify you have the elitemobs.discord.message permission for testing

Channel not found errors:

  • Double-check the spelling of your channel name in both DiscordSRV.yml and EliteMobs DiscordSRV.yml
  • Try using the numeric channel ID instead of the name
  • Ensure the channel is properly configured in DiscordSRV's config.yml

Test command not working:

  • Verify you have the elitemobs.discord.message permission
  • Use the correct syntax: /em discord <message> (with a message)
  • Check server console for error messages