While most people who remix the Guard's code will probably hard-coded their custom filters (some may add regex) to their codebase to cater to their needs.
Can we add custom filters (with regex support) to the bot features?
How managing custom filters looks like without editing the code
Adding usual filters
Network admin will do /addfilter "<stuff here>".
The bot will ask for human input, like media or a link to doom.
The network admin sent his/her input.
Then, the bot will ask who can access this filter. (Public, Network Admins, Bot Masters)
After defining permissions, the bot will save it to the DB.
In any step, admins can abort it by using /cancel.
Adding with regex
Network admin will do /createcfilter "<stuff here with regex stuff>".
The bot will do validation stuff within 15 seconds and then sends its feedback. If there's errors, the bot will tell you to fix it and exits the wizard.
Once validated correctly, the bot will ask for human input, like media or a link to doom.
The network admin sent his/her input.
Then, the bot will ask who can access this filter. (Public, Network Admins, Bot Masters)
After defining permissions, the bot will save it to the DB.
In any step, admins can abort it by using /cancel.
Nuking a filter from DB
An network admin will send a /nukefilter <some stuff> (first, he/she will look it in /filters).
The bot will ask if he/she want to nuke it.
If yes, the bot will nuke that filter from DB. Otherwise, do nothing.
Performance concern: adding too many1 unoptimized2 regexps.
Current custom commands only run 1 simple regex per message. This feature would require to either check each regex against every message, or to combine them all into single complex regex.
Measuring performance of each regex is out of scope of this project.
I'm open to extending custom commands, but not like this.
While most people who remix the Guard's code will probably hard-coded their custom filters (some may add regex) to their codebase to cater to their needs.
Can we add custom filters (with regex support) to the bot features?
How managing custom filters looks like without editing the code
Adding usual filters
/addfilter "<stuff here>"
./cancel
.Adding with regex
/createcfilter "<stuff here with regex stuff>"
./cancel
.Nuking a filter from DB
/nukefilter <some stuff>
(first, he/she will look it in/filters
).