diff --git a/backend/src/plugins/Tags/util/onMessageCreate.ts b/backend/src/plugins/Tags/util/onMessageCreate.ts index b9c16b89..803b6792 100644 --- a/backend/src/plugins/Tags/util/onMessageCreate.ts +++ b/backend/src/plugins/Tags/util/onMessageCreate.ts @@ -15,7 +15,12 @@ export async function onMessageCreate(pluginData: PluginData, ms const member = await resolveMember(pluginData.client, pluginData.guild, msg.user_id); if (!member) return; - const config = pluginData.config.getMatchingConfig({ member, channelId: msg.channel_id }); + const channel = pluginData.guild.channels.get(msg.channel_id) as TextChannel; + const config = pluginData.config.getMatchingConfig({ + member, + channelId: msg.channel_id, + categoryId: channel.parentID, + }); let deleteWithCommand = false; // Find potential matching tag, looping through categories first and checking dynamic tags last @@ -133,7 +138,6 @@ export async function onMessageCreate(pluginData: PluginData, ms return; } - const channel = pluginData.guild.channels.get(msg.channel_id) as TextChannel; const responseMsg = await channel.createMessage(renderedTag); // Save the command-response message pair once the message is in our database