diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-08 20:20:02 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-03-08 20:20:02 -0500 |
commit | 34eb30a144221a584de502fcad5305c8544c07ce (patch) | |
tree | 4f39c1000b4176f2514022f062051bbb1e2b506e /src | |
parent | adc01358c14c2b71d932bdbf928e2c216ef8094f (diff) | |
download | tanzanite-34eb30a144221a584de502fcad5305c8544c07ce.tar.gz tanzanite-34eb30a144221a584de502fcad5305c8544c07ce.tar.bz2 tanzanite-34eb30a144221a584de502fcad5305c8544c07ce.zip |
fix(AppealListener): separate modlogs + force fetch user
Diffstat (limited to 'src')
-rw-r--r-- | src/commands/moderation/modlog.ts | 4 | ||||
-rw-r--r-- | src/listeners/bush/appealListener.ts | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts index b44cff4..66368f9 100644 --- a/src/commands/moderation/modlog.ts +++ b/src/commands/moderation/modlog.ts @@ -3,6 +3,8 @@ import assert from 'assert'; import { ApplicationCommandOptionType, PermissionFlagsBits, User } from 'discord.js'; export default class ModlogCommand extends BushCommand { + public static separator = '\n━━━━━━━━━━━━━━━\n'; + public constructor() { super('modlog', { aliases: ['modlog', 'modlogs'], @@ -61,7 +63,7 @@ export default class ModlogCommand extends BushCommand { const chunked: string[][] = util.chunk(niceLogs, 4); const embedPages = chunked.map((chunk) => ({ title: `${foundUser.tag}'s Mod Logs`, - description: chunk.join('\n━━━━━━━━━━━━━━━\n'), + description: chunk.join(ModlogCommand.separator), color: util.colors.default })); return await ButtonPaginator.send(message, embedPages, undefined, true); diff --git a/src/listeners/bush/appealListener.ts b/src/listeners/bush/appealListener.ts index 9f6b166..7ac9fda 100644 --- a/src/listeners/bush/appealListener.ts +++ b/src/listeners/bush/appealListener.ts @@ -26,7 +26,7 @@ export default class AppealListener extends BushListener { name: `${message.embeds[0].fields.find((f) => f.name === 'What type of punishment are you appealing?')?.value} appeal` }); - const user = await client.users.fetch(userId).catch(() => null); + const user = await client.users.fetch(userId, { force: true }).catch(() => null); if (!user) return await thread.send({ embeds: [ @@ -72,7 +72,9 @@ export default class AppealListener extends BushListener { embed.addFields({ name: '» Latest Modlogs', - value: latestModlogs.map((ml) => ModlogCommand.generateModlogInfo(ml, false)).join('\n') ?? 'No Modlogs Found' + value: latestModlogs.length + ? latestModlogs.map((ml) => ModlogCommand.generateModlogInfo(ml, false)).join(ModlogCommand.separator) + : 'No Modlogs Found' }); await thread.send({ embeds: [embed] }); |