Message blacklist
Managing message blacklist is currently done via commands in Discord.
You can use them either by sending a DM to @PUBG bot#1548 or via a text channel it has access to (e.g. #moderators-only), but only if you have the proper roles (moderator and up).
All commands on this page need to be prefixed with !blacklist. For example the command list would need to be typed as !blacklist list.
Command parameters are specified as <required>, [optional] and (none).
- Command name:
add- Params:
<phrase> - Description:
- Adds a new blacklist phrase.
- Uses JavaScript’s
RegExpsyntax, with the flagsim. - If you are working on a “complex” regular expression, please test it a bit to make sure it’s not extremely taxing and might hang up the message.
- Example:
!blacklist add ^\d+$- matches a message where a line just includes numbers (\d= digits)
- Params:
- Command name:
disable- Params:
<phraseId> - Description:
- Disables a currently message blacklist phrase, specified by the message blacklist ID (number).
- Example:
!blacklist disable 3- Disables blacklist phrase with ID 3.
- Params:
- Command name:
edit- Params:
<phraseId> <newPhrase> - Description:
- Edits an existing blacklist phrase, specified by the message blacklist ID (number).
- Uses JavaScript’s
RegExpsyntax, with the flagsim.
- Example:
!blacklist edit 123 ^\w+$- Edits blacklist phrase with ID 123 to match a message where a line just includes word characters (\w= word characters).
- Params:
- Command name:
instantban- Params:
<phraseId> - Description:
- Toggles the “instant ban” feature for a message blacklist phrase, specified by the message blacklist ID (number).
- If the phrase is already set to be instant ban, it will revert back to “just delete” mode - and vice versa.
- Example:
!blacklist instantban 3- Toggles the “instant ban” feature for blacklist phrase with ID 3.
- Params:
- Command name:
list- Params:
(none) - Description:
- Lists all the currently enabled message blacklist phrases.
- The output format for the list is:
<ID> - [D(elete) or B(an)] - <phrase>
- Example:
!blacklist list
- Params:
- Command name:
reload- Params:
(none) - Description:
- Mainly for debugging. Only useful when I have manually updated the blacklist phrases by working directly in the database.
- Deletes all “cached” (in memory) blacklist phrases and reloads them from the database, including whether or not they’re enabled - or if instantban applies.
- Params:
- Command name:
test- Params:
<Your Message Text> - Description:
- Tests the message text to see if it matches an active blacklist phrase. Useful for making sure your blacklist phrase works as intended.
- Example:
!blacklist test 123566234- Check if there’s a matching phrase when the message text is just123566234(such as the example I used inadd).
- Params:
- Command name:
updateurlshorteners- Params:
(none) - Description:
- Forces an update of the URL shorteners listed here: https://github.com/PeterDaveHello/url-shorteners/blob/master/list
- Keep in mind that this triggers in the background every 24 hours, so it should never really be necessary to use this command.
- Forces an update of the URL shorteners listed here: https://github.com/PeterDaveHello/url-shorteners/blob/master/list
- Params: