1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import { BotListener, colors, Emitter, overflowEmbed, TanzaniteEvent, type BotClientEvents } from '#lib';
export default class MassEvidenceListener extends BotListener {
public constructor() {
super(TanzaniteEvent.MassEvidence, {
emitter: Emitter.Client,
event: TanzaniteEvent.MassEvidence
});
}
public async exec(...[moderator, guild, evidence, lines]: BotClientEvents[TanzaniteEvent.MassEvidence]) {
const logChannel = await guild.getLogChannel('moderation');
if (!logChannel) return;
const embeds = overflowEmbed(
{
color: colors.DarkRed,
title: 'Mass Evidence',
timestamp: new Date().toISOString(),
fields: [
{ name: '**Moderator**', value: `${moderator} (${moderator.user.tag})` },
{ name: '**Evidence**', value: `${evidence}` }
]
},
lines
);
return await logChannel.send({ embeds });
}
}
|