[...Some Ruby pun...]
The purpose of this bot is to monitor the messages sent to a specific channel in a discord server and check that they adhere to the arbitrary rules which are as follows:
- the message starts with either "JCMB" or "Bayes" (case insensitive and non-optional)
- followed by one or more spaces, then a word (optional)
- followed by one punctuation mark
- prepend message with "not " to remove yourself from location
Any messages sent to the channel in question which do not adhere to these rules receive a sequence of demeining reactions. And then, after a delay, the message is deleted by this bot.
If message adheres to rules, bot posts a picture to remind people of everybody's choices between JMCMB and Bayes.
Ruby and Imagemagick.
- Install Ruby Gem dependencies with
bundle install
- Copy
auth.sample.yml
toauth.yml
and edit with your Bot Token and Channel ID
bundle exec ruby main.rb