mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
tags: fix category_id override criterion not working
This commit is contained in:
parent
c39d69dd5d
commit
5327d5534b
1 changed files with 6 additions and 2 deletions
|
@ -15,7 +15,12 @@ export async function onMessageCreate(pluginData: PluginData<TagsPluginType>, ms
|
||||||
const member = await resolveMember(pluginData.client, pluginData.guild, msg.user_id);
|
const member = await resolveMember(pluginData.client, pluginData.guild, msg.user_id);
|
||||||
if (!member) return;
|
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;
|
let deleteWithCommand = false;
|
||||||
|
|
||||||
// Find potential matching tag, looping through categories first and checking dynamic tags last
|
// Find potential matching tag, looping through categories first and checking dynamic tags last
|
||||||
|
@ -133,7 +138,6 @@ export async function onMessageCreate(pluginData: PluginData<TagsPluginType>, ms
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const channel = pluginData.guild.channels.get(msg.channel_id) as TextChannel;
|
|
||||||
const responseMsg = await channel.createMessage(renderedTag);
|
const responseMsg = await channel.createMessage(renderedTag);
|
||||||
|
|
||||||
// Save the command-response message pair once the message is in our database
|
// Save the command-response message pair once the message is in our database
|
||||||
|
|
Loading…
Add table
Reference in a new issue