Dev Diary - Server List Discord Bot

iwCSA26.png

Almost 1 year ago I threw together the official web-based server list as a replacement for Jacklul's after it stopped working. Since then it's received some visible and less visible enhancements, the most significant occurring earlier this year when we started collecting server statistics. Now I'd like to introduce a new service that reuses some of that prior work: a Discord bot!

Features
Just like the web version of the server list, the bot makes it easy to see what servers are active without needing to start the game:

serverlist.png



You can also get some basic stats or a list of maps distributed with the launcher:

stats.png
maps.png



While that's all useful, I don't think those commands alone would be enough of a reason to bother writing a bot - if you're already on a device that can use Discord, you could just as easily refresh the website, so why bother typing a command just to get a subset of the same information? In truth this is just bonus incidental stuff that was necessary for building the main feature, a flexible notification system.

The notification system allows you to setup personal alerts (received as direct messages from the bot) whenever a matching set of conditions is found on the server list. For instance, say you have a favorite server and want to know when it's well populated:

watch.png



Map and game mode filters can also be added for more granular address notifications, or you can setup a general notification that will trigger for any server running a map or game mode with a certain number of players:

watchmap.png


watchmode.png



Any notifications you receive will look something like this:

notification.png



Now at this point you might be thinking this sounds useful, but getting notified all the time could get very annoying. I agree! That's why there are options to control notification frequency and specificity so things don't get out of hand:
  • Cooldown (so you won't receive another message again for N hours):
    setcooldown.png


  • Region (only see general map or mode notifications for servers near you):
    setregion.png


  • Mute (temporarily silence the bot without losing any configured settings):
    setmute.png

But wait, there's more! With a slight variation to the watch command, you can configure the bot to send @here mentions back to the same channel. This is intended to aid a clan or any other group who might want to populate servers when they start getting activity:

chanwatch.png


There are a few other commands and more usage details which can be seen using !serverlist help.

Availability
The bot has been sitting in the Movie Battles II Discord for testing and feedback over the past week. Now that all the main features are done, I also want to make it generally available. You can invite the bot to your server (if you have management rights) using this link:

Some things to keep in mind for server owners:
  • The default rights the bot gets when invited should allow it to work properly, but you might want to restrict it to a specific channel if you don't want command spam everywhere. The easiest way to do that is simply preventing it from reading messages in any channel you don't want it available in (the bot can't respond to commands it can't see).
  • Anyone with the channel permission Mention Everyone can configure channel targeted notifications, so restrict that to avoid spam.
  • If you want the bot to send channel notifications without actually alerting anyone (just a plain message), revoke its Mention Everyone permission.
 

Noob

Nerd
Donator
Movie Battles II Team
Posts
1,512
Likes
1,608
Nice, it's really blossomed from what it started as
 
Top