Don't apply Automod on Zeppelin itself

This commit is contained in:
Dragory 2021-08-21 00:39:50 +03:00
parent 57705656f9
commit b336e8b5f4
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

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,