diff --git a/.changeset/twelve-chairs-thank.md b/.changeset/twelve-chairs-thank.md new file mode 100644 index 0000000..9963def --- /dev/null +++ b/.changeset/twelve-chairs-thank.md @@ -0,0 +1,5 @@ +--- +"dixt-plugin-react": patch +--- + +Fix match case diff --git a/packages/dixt-plugin-react/src/index.ts b/packages/dixt-plugin-react/src/index.ts index 506372f..f80a0d7 100644 --- a/packages/dixt-plugin-react/src/index.ts +++ b/packages/dixt-plugin-react/src/index.ts @@ -22,7 +22,7 @@ export const optionsDefaults = { const dixtPluginReact: DixtPlugin = ( instance, - optionsValue?: DixtPluginReactOptions, + optionsValue?: DixtPluginReactOptions ) => { const options = merge({}, optionsDefaults, optionsValue); if (options.channels.length === 0) { @@ -35,7 +35,7 @@ const dixtPluginReact: DixtPlugin = ( if (message.channel.id === channel.id) { if (channel.matchs && channel.matchs.length > 0) { channel.matchs.forEach((match) => { - if (message.content.includes(match)) { + if (message.content.toLowerCase().includes(match.toLowerCase())) { message.react(channel.emoji); } }); @@ -43,7 +43,7 @@ const dixtPluginReact: DixtPlugin = ( message.react(channel.emoji); } } - }, + } ); });