From 6d468bc0dc712b43b592007237f567fc0dc290da Mon Sep 17 00:00:00 2001 From: Evorp <3vorpgaming@gmail.com> Date: Wed, 18 Oct 2023 16:52:55 -0700 Subject: [PATCH] use display names instead of usernames where possible --- src/commands/bot/status.ts | 4 ++-- src/commands/faithful/about.ts | 4 ++-- src/helpers/functions/feedback.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/commands/bot/status.ts b/src/commands/bot/status.ts index 0dbdb6ae6..92a55c1d7 100644 --- a/src/commands/bot/status.ts +++ b/src/commands/bot/status.ts @@ -46,7 +46,7 @@ export const command: SlashCommand = { if (!interaction.hasPermission("dev")) return; const activity = interaction.options.getString("activity", true); - const presence = interaction.options.getString("presence", true); + const presence = interaction.options.getString("presence", true) as PresenceStatusData; const message = interaction.options.getString("message", true); interaction.client.user.setPresence({ @@ -56,7 +56,7 @@ export const command: SlashCommand = { type: ActivityType[activity], }, ], - status: presence as PresenceStatusData, + status: presence, }); await interaction.reply({ diff --git a/src/commands/faithful/about.ts b/src/commands/faithful/about.ts index 1c3e412d4..ecd46914a 100644 --- a/src/commands/faithful/about.ts +++ b/src/commands/faithful/about.ts @@ -40,7 +40,7 @@ export const command: SlashCommand = { ).data; } catch { const finalEmbed = new EmbedBuilder() - .setTitle(`${user.username} has no contributions!`) + .setTitle(`${user.displayName} has no contributions!`) .setDescription( "No database profile was found for this user. If this data looks incorrect, register at https://webapp.faithfulpack.net.", ); @@ -101,7 +101,7 @@ export const command: SlashCommand = { const finalEmbed = new EmbedBuilder() .setTitle( - `${user.username} has ${finalData.length} ${ + `${user.displayName} has ${finalData.length} ${ finalData.length == 1 ? "contribution" : "contributions" }!`, ) diff --git a/src/helpers/functions/feedback.ts b/src/helpers/functions/feedback.ts index 5d964bb82..8bc374b9c 100644 --- a/src/helpers/functions/feedback.ts +++ b/src/helpers/functions/feedback.ts @@ -24,7 +24,7 @@ export default async function sendFeedback( owner: "Faithful-Resource-Pack", repo: "CompliBot", title, - body: `*Issue originally created by \`${interaction.user.username}\` on Discord*\n\n${description}`, + body: `*Issue originally created by \`${interaction.user.displayName}\` on Discord*\n\n${description}`, }); } catch (err) { interaction.followUp({