Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChatTrigger: Completely rework the criteria and parameter systems #122

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Apr 13, 2024

  1. 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".
    camnwalter committed Apr 13, 2024
    Configuration menu
    Copy the full SHA
    4128ec4 View commit details
    Browse the repository at this point in the history