3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

Don't apply Automod on Zeppelin itself

This commit is contained in:
Dragory 2021-08-21 00:39:50 +03:00
parent 1e0b250f0d
commit 01fcab3262

View file

@ -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 categoryId = channel?.parentId;
// Don't apply Automod on Zeppelin itself
if (userId && userId === pluginData.client.user?.id) {
return;
}
const config = await pluginData.config.getMatchingConfig({
channelId,
categoryId,