From c073bedc1cf87e9114720af46e789d66a4d55200 Mon Sep 17 00:00:00 2001 From: AnxietyisReal <96593068+AnxietyisReal@users.noreply.github.com> Date: Sat, 18 Mar 2023 19:19:41 +1100 Subject: [PATCH] Formatting --- src/commands/bonk.ts | 2 +- src/events/messageDeleteBulk.ts | 6 +----- src/models/punishments.ts | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/commands/bonk.ts b/src/commands/bonk.ts index 6f091d4..d59e99d 100644 --- a/src/commands/bonk.ts +++ b/src/commands/bonk.ts @@ -7,7 +7,7 @@ export default { const reason = interaction.options.getString('reason'); const adminPerm = member.permissions.has('Administrator'); if (adminPerm) return interaction.reply('You cannot bonk an admin!'); - + await client.bonkCount._incrementUser(member.id); interaction.reply({embeds: [new client.embed().setColor(client.config.embedColor) .setDescription(`> <@${member.id}> has been bonked!\n${reason?.length == null ? '' : `> Reason: **${reason}**`}`) diff --git a/src/events/messageDeleteBulk.ts b/src/events/messageDeleteBulk.ts index 8bc7770..1ead86f 100644 --- a/src/events/messageDeleteBulk.ts +++ b/src/events/messageDeleteBulk.ts @@ -5,10 +5,6 @@ export default { if (!client.config.botSwitches.logs) return; if (client.config.mainServer.id != '468835415093411861') return; const channel = client.channels.resolve(client.config.mainServer.channels.logs) as Discord.TextChannel; - channel.send({embeds: [new client.embed().setColor(client.config.embedColorRed).setTimestamp().setTitle(`${messages.size} messages were purged`) - .setDescription(`\`\`\`${messages.map((msgs)=>`${msgs.member?.displayName}: ${msgs.content}`).reverse().join('\n').slice(0,3900)}\`\`\``).addFields( - {name: 'Channel', value: `<#${messages.first().channel.id}>`} - )] - }) + channel.send({embeds: [new client.embed().setColor(client.config.embedColorRed).setTimestamp().setTitle(`${messages.size} messages were purged`).setDescription(`\`\`\`${messages.map((msgs)=>`${msgs.member?.displayName}: ${msgs.content}`).reverse().join('\n').slice(0,3900)}\`\`\``).addFields({name: 'Channel', value: `<#${messages.first().channel.id}>`})]}) } } diff --git a/src/models/punishments.ts b/src/models/punishments.ts index 5f6ffc7..480c66d 100644 --- a/src/models/punishments.ts +++ b/src/models/punishments.ts @@ -36,8 +36,7 @@ export default class punishments extends Schema { {name: '🔹 Moderator', value: `<@${punishment.moderator}>\n\`${punishment.moderator}\``, inline: true}, {name: '\u200b', value: '\u200b', inline: true}, {name: '🔹 Reason', value: `\`${punishment.reason}\``, inline: true}) - .setColor(this.client.config.embedColor) - .setTimestamp(punishment.time) + .setColor(this.client.config.embedColor).setTimestamp(punishment.time) if (punishment.duration) embed.addFields({name: '🔹 Duration', value: this.client.formatTime(punishment.duration, 100), inline: true}, {name: '\u200b', value: '\u200b', inline: true}) if (punishment.cancels) { const cancels = await this._content.findById(punishment.cancels);