From 0c5997a33c727ca72d4e0d22fe168d8b4b482d1b Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Wed, 23 Feb 2022 18:19:36 -0500 Subject: perf(ModlogCommand): don't use Embed builder --- src/commands/moderation/modlog.ts | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts index c089d40..b44cff4 100644 --- a/src/commands/moderation/modlog.ts +++ b/src/commands/moderation/modlog.ts @@ -1,6 +1,6 @@ import { BushCommand, ButtonPaginator, ModLog, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import assert from 'assert'; -import { ApplicationCommandOptionType, Embed, PermissionFlagsBits, User } from 'discord.js'; +import { ApplicationCommandOptionType, PermissionFlagsBits, User } from 'discord.js'; export default class ModlogCommand extends BushCommand { public constructor() { @@ -59,14 +59,11 @@ export default class ModlogCommand extends BushCommand { if (!logs.length || !niceLogs.length) return message.util.reply(`${util.emojis.error} **${foundUser.tag}** does not have any modlogs.`); const chunked: string[][] = util.chunk(niceLogs, 4); - const embedPages = chunked.map( - (chunk) => - new Embed({ - title: `${foundUser.tag}'s Mod Logs`, - description: chunk.join('\n━━━━━━━━━━━━━━━\n'), - color: util.colors.default - }) - ); + const embedPages = chunked.map((chunk) => ({ + title: `${foundUser.tag}'s Mod Logs`, + description: chunk.join('\n━━━━━━━━━━━━━━━\n'), + color: util.colors.default + })); return await ButtonPaginator.send(message, embedPages, undefined, true); } else if (search) { const entry = await ModLog.findByPk(search as string); -- cgit