-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ChatTrigger: Completely rework the criteria and parameter systems
This removes the `Parameter` class and replaces it with 3 methods: `startsWith`, `contains`, and `endsWith`. These methods all take in criterias to make the API more understandable to users (in the past, I've noticed a lot of people attempting to do `setContains(msg)` instead of `setCriteria(msg).setContains()`). setCriteria will work as normal, with a few slight tweaks. - Now global flags will work if the criteria is passed as a Regex - `.` or criteria variables will now detect `\n`. - String criteria variables will now not be greedy. e.g. `setContains("<${a}>")` with a string of "<A> B>" will capture "A" in this string, instead of "A> B".
- Loading branch information
1 parent
5dc54f0
commit 4128ec4
Showing
4 changed files
with
113 additions
and
182 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.