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.

Note: EliteMobs is tested with DiscordSRV version 1.28.0. While other versions may work, this version is known to be compatible.

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. [Bad] The name of your room as it appears on discord. This is not guaranteed to work correctly due to a number of factors. Keep in mind that your discord room must be set up on DiscordSRV's config files - just because you can put the name of the room in this configuration file does not mean you can skip configuring it on DiscordSRV.

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, then by DiscordSRV's channel mapping, and finally by channel name search
  • Only Custom Bosses with announcement priority 3 or higher will trigger Discord notifications
  • The same spawn, death, and escape messages shown in-game are sent to Discord

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!

If your message shows up in the configured Discord channel, you're done!

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