From dc273dd2801ba54ecb74fb1be75bc64eff5d551c Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sat, 15 Jan 2022 18:12:05 -0500 Subject: make button ban response fetch user instead of member --- src/lib/common/AutoMod.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts index a1f2f1e..7a30820 100644 --- a/src/lib/common/AutoMod.ts +++ b/src/lib/common/AutoMod.ts @@ -308,20 +308,20 @@ export class AutoMod { evidence: (interaction.message as BushMessage).url ?? undefined }); - const victimFormatted = victim ?? userId; + const victimUserFormatted = (await util.resolveNonCachedUser(userId))?.tag ?? userId; if (result === banResponse.SUCCESS) return interaction.reply({ - content: `${util.emojis.success} Successfully banned **${victimFormatted}**.`, + content: `${util.emojis.success} Successfully banned **${victimUserFormatted}**.`, ephemeral: true }); else if (result === banResponse.DM_ERROR) return interaction.reply({ - content: `${util.emojis.warn} Banned ${victimFormatted} however I could not send them a dm.`, + content: `${util.emojis.warn} Banned ${victimUserFormatted} however I could not send them a dm.`, ephemeral: true }); else return interaction.reply({ - content: `${util.emojis.error} Could not ban **${victimFormatted}**: \`${result}\` .`, + content: `${util.emojis.error} Could not ban **${victimUserFormatted}**: \`${result}\` .`, ephemeral: true }); } -- cgit