diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-23 18:19:36 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-23 18:19:36 -0500 |
commit | 0c5997a33c727ca72d4e0d22fe168d8b4b482d1b (patch) | |
tree | c2354958011b9cec2c3ce45b04cf5ef5cd60aa6b /src/commands/moderation | |
parent | b2d7213fffe5512b76e252fe86c9bf6f45514906 (diff) | |
download | tanzanite-0c5997a33c727ca72d4e0d22fe168d8b4b482d1b.tar.gz tanzanite-0c5997a33c727ca72d4e0d22fe168d8b4b482d1b.tar.bz2 tanzanite-0c5997a33c727ca72d4e0d22fe168d8b4b482d1b.zip |
perf(ModlogCommand): don't use Embed builder
Diffstat (limited to 'src/commands/moderation')
-rw-r--r-- | src/commands/moderation/modlog.ts | 15 |
1 files changed, 6 insertions, 9 deletions
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); |