Inconsistent bot prefixes #5

Open
opened 2022-11-22 21:51:30 +01:00 by bea · 0 comments
Owner

We should:

  • allow setting multiple bot prefixes in the configuration file,
  • use a single source for prefixes instead of multiple (we have a RegEx in one class and a String in another class now).

We should grab all strings from the config and automate building a RegEx similar to (?i)^(prefix1|prefix2|prefix3)\b.

This has the drawback of limiting us to specific one-word prefixes, but we could technically add exceptions to the message listener to also still support more elaborate RegEx expressions (or support eg. a single ! as a prefix, without being followed by a word break, like !help.).

We should: - allow setting multiple bot prefixes in the configuration file, - use a single source for prefixes instead of multiple (we have a RegEx in one class and a String in another class now). We should grab all strings from the config and automate building a RegEx similar to `(?i)^(prefix1|prefix2|prefix3)\b`. This has the drawback of limiting us to specific one-word prefixes, but we could technically add exceptions to the message listener to also still support more elaborate RegEx expressions (or support eg. a single `!` as a prefix, without being followed by a word break, like `!help`.).
bea added the
enhancement
label 2022-11-22 21:51:35 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bea/HidekoBot#5
No description provided.