Forumlancer A Discord bot for DiscoveryGC Forumlancer is a Discord bot that provides notifications for activity on the DiscoveryGC forums. Never miss a post again by adding it to your server!
Purpose
The forum is an integral part of Discovery Freelancer. Despite this, it is often difficult or frustrating for members to stay abreast of activity relevant to them. The forum search function has a minimum query length of 4 characters - useless for the many player factions that go by three-letter abbreviations.
Forumlancer allows you to automatically subscribe to threads whose titles contain terms you are interested in and receive notifications of their activity in your Discord server.
Optionally, you can create a role for Forumlancer to constrain it to the channel you want to use for notifications. The bot must be able to read and send messages and embeds in this channel for it to be useful.
Run f/init in the channel you want to receive notifications in.
Commands
The bot will accept commands prefaced with f/. To get started, use f/help. Here are the commands:
Watchlist
‣watch <term>
Get notifications for threads with titles including this term. Note that terms can include punctuation and are case-insensitive. Terms can also be partial words: for example, "pub" would match titles containing the word "Republic".
‣unwatch <term>
Stop getting notifications for threads including this term.
‣watchlist
Show all saved watch terms.
‣clear
Clear the watchlist.
Ignore list
‣exclude <profile_url>
Prevent a forum account (such as your own) from triggering notifications.
‣include <profile_url>
Stop preventing a forum account from causing notifications.
‣excluded
List excluded forum accounts.
General
‣help
Show a help message. Run help <command> to see help about that command.
‣init
Configure the bot to use this channel for notifications.
‣info
Show information about the bot.
‣preview <on/off>
Configure whether notifications include a preview of post content (defaults to on).
Finally, as a bonus/Easter egg/irritation, Forumlancer will also respond to several Skype emoticon names – e.g. "(bandit)" – so you can reminisce about the good old days.
Known issues
Weird backslashes appear in embeds on mobile
Discord's Markdown parser on mobile is broken. I can't fix this.
How it works
Rather than scraping the entire contents of the site, Forumlancer periodically scans the "latest threads" sidebar on the forum homepage. I chose this method because it's quick and easy, but also out of consideration for the number of requests made to the web server. An RSS feed for the forum exists, and this would be best of all if not for its posts lagging the actual forum activity by a few hours for some reason.
Forumlancer is written in Ruby and its code is licensed under the GNU AGPL-3.0. The source code is available on GitHub.
You may have noticed that Forumlancer was down for around a month. Sorry about that. This happened because I updated my Pi to Alpine 3.14 (ironic, right?) and fell victim to this regression, which knocked it off the network. I then found I couldn't get ethernet working for some reason, which meant I had to set everything up again from scratch, which I didn't have time to do until now. This time I have taken a proper image so that recovering from this sort of thing should take far less time.
I did have a filesystem backup so everyone's config is exactly as it was when the bot went down. I also deployed some code updates made a while ago which mean some commands have been renamed - run f/help to reacquaint yourself.
Faced with even more network non-cooperation I spent some time migrating the app back to Heroku. You should notice no changes, except that the bot should now have uptime much closer to 100%.
I have fixed a bug that led to occasional crashes, causing sporadic bot downtime and missed notifications. Sorry about that. Thanks to @Shelco for reporting it.
Thanks for the bot, just started using it.
Please, what kind of sorting is the f/watchlist command using?
It is not the order terms were added in. It seems alphabetical, with uppercase being first, but not always.