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

fix(logs): fix inconsistent thread/channel/category exclusions; add excluded_threads log channel option

This commit is contained in:
Dragory 2022-08-13 23:19:06 +03:00
parent 218c31231e
commit d472fd4fa6
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
32 changed files with 132 additions and 51 deletions

View file

@ -5,6 +5,7 @@ import { log } from "../util/log";
import { createTypedTemplateSafeValueContainer } from "../../../templateFormatter";
import { BaseGuildTextChannel, GuildChannel, GuildMember, ThreadChannel } from "discord.js";
import { channelToTemplateSafeChannel, memberToTemplateSafeMember } from "../../../utils/templateSafeObjects";
import { resolveChannelIds } from "../../../utils/resolveChannelIds";
interface LogMessageSpamDetectedData {
member: GuildMember;
@ -30,9 +31,8 @@ export function logMessageSpamDetected(pluginData: GuildPluginData<LogsPluginTyp
{
userId: data.member.id,
roles: Array.from(data.member.roles.cache.keys()),
channel: data.channel.id,
category: data.channel.parentId,
bot: data.member.user.bot,
...resolveChannelIds(data.channel),
},
);
}