Forumlancer is a Discord bot that provides notifications for activity on the DiscoveryGC forums.
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.
Add Forumlancer#5256 to your server using this link.
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 send messages and embeds.
The bot will accept commands prefaced with f/
- to get started, use f/help
. The basic commands are:
help
- show a help message. Runhelp <command>
to see help about that commandinit
- configure the bot to use this channel for notificationswatch <term>
- get notifications for threads with titles including this termunwatch <term>
- no longer get notifications for threads including this termwatchlist
- show the current watchlistignore <profile_url>
- exclude a forum account (such as your own) from causing notificationsunignore <profile_url>
- no longer exclude a forum account from causing notificationsignored
- show ignored forum accountsinfo
- show information about the bot
As a bonus/Easter egg/irritation, Forumlancer will also respond to many Skype emoticon names - e.g. "(bandit)" - so you can reminisce about the good old days.
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 uses the excellent discordrb, Oga and rufus-scheduler, as well as my own library geode. All of Forumlancer's code is licensed under the GNU AGPL-3.0.
I currently host Forumlancer (for free) on Fly.io. To run it yourself,
- create a bot user
- set the environment variable
TOKEN
to your bot's token
- set the environment variable
- start postgres
- run
bundle install
to install dependencies - run
bundle exec ruby src/forumlancer.rb
to start the bot.