Commit Graph

13 Commits

Author SHA1 Message Date
Wolfsblvt
3632631997 random and pick allow empty items and trim correctly 2024-04-02 01:02:02 +02:00
Wolfsblvt
9b24397f5a Unify {{pick}} and {{random}} regex
- Allow all four possible syntax forms, just to make this easier: {{random:1️⃣:two}}, {{random1️⃣:two}}, {{random::one,two}} and {{random:one,two}}
2024-04-02 00:42:13 +02:00
Cohee
4f6127c8f2 Actually support comma-split syntax in random 2024-04-02 01:16:25 +03:00
Wolfsblvt
70adee3c63 Add {{pick}} macro replacement
- Pick macro that works like random, but is consistent for the chat and context
- Change help text for random to actually utilize the new, preferred syntax
2024-04-01 01:47:56 +02:00
Cohee
d997f8dc53 Add {{trim}} macro 2024-03-30 12:26:21 +02:00
Cohee
76cde592ad #1940 Allow both random syntaxes in one message 2024-03-23 00:57:33 +02:00
Cohee
2baea084a1 Add lastCharMessage and lastUserMessage macros 2024-03-17 02:45:22 +02:00
Cohee
d311780328 Fix performance in macro substitution 2024-03-16 01:38:23 +02:00
Cohee
5f1e290bda Disallow multiple {{original}} macro substitutions 2024-01-29 00:58:29 +02:00
valadaptive
71f47588cd Pass macro variables in to evaluateMacros
This doesn't cover *all* the variables yet, just the ones that were
previously passed in as arguments. I'll expand this later to separate
the macro parsing from the execution of the functions themselves.
2024-01-27 13:20:44 -05:00
Cohee
9bb404fb34 Add missing arg to JSdoc 2024-01-12 11:48:34 +02:00
Cohee
a5edf2696f Fix relative imports 2024-01-12 11:47:00 +02:00
valadaptive
89a999cfd4 Move macro substitution to new module
substituteParams has become a thin wrapper around the new evaluateMacros
function, and will become more of a compatibility shim as refactorings
and rewrites are done.
2024-01-10 22:22:30 -05:00