Don't apply Automod on Zeppelin itself
This commit is contained in:
parent
57705656f9
commit
b336e8b5f4
1 changed files with 5 additions and 0 deletions
|
@ -15,6 +15,11 @@ export async function runAutomod(pluginData: GuildPluginData<AutomodPluginType>,
|
||||||
const channel = channelId ? (pluginData.guild.channels.cache.get(channelId as Snowflake) as TextChannel) : null;
|
const channel = channelId ? (pluginData.guild.channels.cache.get(channelId as Snowflake) as TextChannel) : null;
|
||||||
const categoryId = channel?.parentId;
|
const categoryId = channel?.parentId;
|
||||||
|
|
||||||
|
// Don't apply Automod on Zeppelin itself
|
||||||
|
if (userId && userId === pluginData.client.user?.id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const config = await pluginData.config.getMatchingConfig({
|
const config = await pluginData.config.getMatchingConfig({
|
||||||
channelId,
|
channelId,
|
||||||
categoryId,
|
categoryId,
|
||||||
|
|
Loading…
Add table
Reference in a new issue