mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-11 03:13:46 +00:00
feat(blacklist): add /blacklist shorthand and /whitelist_rnd
/blacklist is the short form of the two read commands: bare it lists both lists like /blacklist_rules, and given text it judges that text like /blacklist_check. Both long names stay for when the intent should be explicit. An argument of only whitespace is not an argument, so it lists. /whitelist_rnd returns one whitelist entry chosen at random, and says the list is empty rather than answering with nothing. It reads only the whitelist, and only for the calling topic. The six existing command descriptions are shortened alongside. /help renders as one un-chunked message pinned at 4096 runes, and two more commands pushed it to 4123; the shorter wording brings it to 4049. That ceiling is a shared limit this module did not create, and it will bind again on the next command added anywhere in the repo.
This commit is contained in:
1 parent
c47bcf2c7f
commit
53e569ca12
6 files changed
+194
-13
No files matched your search
@@ -5,15 +5,24 @@ exceptions, then ask whether a given text is blocked.
|
||||
|
||||
| Command | Parameters | What it does |
|
||||
|---|---|---|
|
||||
| `/blacklist` | `[text...]` | Bare, lists both lists; with text, judges it |
|
||||
| `/blacklist_add` | `[text...]` | Adds text to the blacklist, or the message you replied to |
|
||||
| `/blacklist_del` | `<text...>` | Removes text from the blacklist |
|
||||
| `/whitelist_add` | `[text...]` | Adds an exception, or the message you replied to |
|
||||
| `/whitelist_del` | `<text...>` | Removes an exception |
|
||||
| `/blacklist_rules` | — | Lists both lists in one message |
|
||||
| `/blacklist_check` | `<text...>` | Judges a text against both lists |
|
||||
| `/whitelist_rnd` | — | Returns one whitelist entry at random |
|
||||
|
||||
All are public and single-shot.
|
||||
|
||||
`/blacklist` is the short form of the two read commands: on its own it does what
|
||||
`/blacklist_rules` does, and given text it does what `/blacklist_check` does. Nothing is
|
||||
lost by using it — the long names remain for when the intent should be explicit.
|
||||
|
||||
`/whitelist_rnd` returns a single whitelist entry chosen at random, and says so plainly when
|
||||
the whitelist is empty rather than answering with nothing.
|
||||
|
||||
## The bot does not police the chat
|
||||
|
||||
This is the first thing to know, because the module's name promises something it
|
||||
|
||||
Reference in new issue
Block a user