Skip to content

Commit

Permalink
fix: chatMessageTextOnly aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
CKY- committed Dec 13, 2024
1 parent 11dbb00 commit ade9def
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ const model: ReplaceVariable = {
.filter(tp => tp !== "");

// Trim the command trigger if this was a command, unless an optional argument of false was provided.
if (trigger?.type === EffectTrigger.COMMAND && trigger?.metadata?.command?.trigger !== null &&
if (trigger?.type === EffectTrigger.COMMAND && trigger?.metadata?.userCommand?.trigger !== null &&
(args.length < 1 || !(args[0] === false || `${args[0]}`.toLowerCase() === "false"))) {

const triggerRegex = new RegExp(trigger.metadata.command.trigger, "i");
const triggerRegex = new RegExp(trigger.metadata.userCommand.trigger, "i");
const triggerIndex = textParts.findIndex(tp => triggerRegex.test(tp));

if (triggerIndex >= 0) {
Expand Down

0 comments on commit ade9def

Please sign in to comment.