unixporn / trup

Discord bot for the Unixporn community
Mozilla Public License 2.0
47 stars 9 forks source link

!blocklist command #48

Closed elkowar closed 4 years ago

elkowar commented 4 years ago

This PR adds the !blocklist command, allowing moderators to add, remove and list words in the blocklist. The blocklist is a list of regexes that messages will be matched against, removing them if they match. These removals are explicitly logged in botlog. Blocklist commands can only be run from moderator internal channels, such as to not accidentally leak the list of regexes. For this to work there is a new environment variable added that has the ID of the /su/-category.