aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/modlog.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-31 17:28:25 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-31 17:28:25 -0400
commit9aa46f79516c0c044742339c59d471b43060d84f (patch)
treeeeed189fe3d7637043b07c2a292aa2896a175476 /src/commands/moderation/modlog.ts
parentbada2976eed34a2530bc09683d2de17c71c744a8 (diff)
downloadtanzanite-9aa46f79516c0c044742339c59d471b43060d84f.tar.gz
tanzanite-9aa46f79516c0c044742339c59d471b43060d84f.tar.bz2
tanzanite-9aa46f79516c0c044742339c59d471b43060d84f.zip
bug fixes etc
Diffstat (limited to 'src/commands/moderation/modlog.ts')
-rw-r--r--src/commands/moderation/modlog.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts
index ef0a56e..fd53ea7 100644
--- a/src/commands/moderation/modlog.ts
+++ b/src/commands/moderation/modlog.ts
@@ -35,6 +35,7 @@ export default class ModlogCommand extends BushCommand {
}
#generateModlogInfo(log: ModLog): string {
+ const trim = (str: string): string => (str.endsWith('\n') ? str.substring(0, str.length - 1).trim() : str.trim());
const modLog = [
`**Case ID**: ${log.id}`,
`**Type**: ${log.type.toLowerCase()}`,
@@ -42,8 +43,8 @@ export default class ModlogCommand extends BushCommand {
`**Moderator**: <@!${log.moderator}> (${log.moderator})`
];
if (log.duration) modLog.push(`**Duration**: ${util.humanizeDuration(log.duration)}`);
- modLog.push(`**Reason**: ${log.reason ?? 'No Reason Specified.'}`);
- if (log.evidence) modLog.push(`**Evidence:** ${log.evidence}`);
+ modLog.push(`**Reason**: ${trim(log.reason ?? 'No Reason Specified.')}`);
+ if (log.evidence) modLog.push(`**Evidence:** ${trim(log.evidence)}`);
return modLog.join(`\n`);
}
@@ -70,11 +71,11 @@ export default class ModlogCommand extends BushCommand {
(chunk) =>
new MessageEmbed({
title: `${foundUser.tag}'s Mod Logs`,
- description: chunk.join('\n**―――――――――――――――――――――――――――**\n'),
+ description: chunk.join('\n━━━━━━━━━━━━━━━\n'),
color: util.colors.default
})
);
- return await util.buttonPaginate(message, embedPages, '', true);
+ return await util.buttonPaginate(message, embedPages, undefined, true);
} else if (search) {
const entry = await ModLog.findByPk(search as string);
if (!entry) return message.util.send(`${util.emojis.error} That modlog does not exist.`);