From 9e88f0f8fec2f0f6a5968460f281b67ea2084c4d Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 27 Oct 2019 23:58:41 -0400 Subject: [PATCH] modlogs cmd fix --- src/commands/modlogs.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/commands/modlogs.ts b/src/commands/modlogs.ts index ae6e9f6..227b5c9 100644 --- a/src/commands/modlogs.ts +++ b/src/commands/modlogs.ts @@ -23,8 +23,6 @@ export default class Modlogs extends Command { const formatted = query.map((log) => { const { username, moderatorID, reason, type, date } = log; - this.client.signale.debug(log); - this.client.signale.debug(type); let name: string; if (type === 0) { name = 'Create'; @@ -39,7 +37,6 @@ export default class Modlogs extends Command { } const value = `**Account name:** ${username}\n**Moderator:** <@${moderatorID}>\n**Reason:** ${reason}\n**Date:** ${date.toLocaleString('en-us')} EST`; const inline = true; - this.client.signale.debug(name); return { name, value, inline }; }); const users = [...new Set(query.map((log) => log.userID))].map((u) => `<@${u}>`); @@ -59,7 +56,12 @@ export default class Modlogs extends Command { return embed; }); - createPaginationEmbed(message, this.client, embeds, {}, msg); + if (embeds.length === 1) { + // @ts-ignore + message.channel.createMessage({ embed: embeds[0] }); + } else { + createPaginationEmbed(message, this.client, embeds, {}, msg); + } return msg; } catch (error) { return this.client.util.handleError(error, message, this);