Zuletzt aktiv 1694319905

Handles how many warns a user can have.

warn.js Orginalformat
1if (cases && cases.length >= 3) return enfinity.interaction.guild.bans.create(member.user.id, {
2 reason: 'User has exceeded our allowed maximum of 3 warnings'
3 }).then(async banned => {
4 await log.send({
5 embeds: [
6 new enfinity.Gateway.EmbedBuilder()
7 .setTitle('Action: ban user')
8 .setColor(enfinity.colors.base)
9 .setThumbnail(enfinity.logo)
10 .setDescription('Whoops, someone messed up and got the bean')
11 .addFields(
12 {
13 name: 'User',
14 value: `${banned.globalName ? banned.globalName : banned.username}`,
15 inline: true
16 },
17 {
18 name: 'User ID',
19 value: `${banned.id}`,
20 inline: true
21 },
22 {
23 name: 'Moderator',
24 value: `${enfinity.user.username}`,
25 inline: true
26 },
27 {
28 name: 'Reason',
29 value: `User has exceed our allowed maximum of 3 warnings.`,
30 inline: false
31 }
32 )
33 .setTimestamp()
34 .setFooter({
35 text: enfinity.footer,
36 iconURL: enfinity.logo
37 })
38 ]
39 });