diff --git a/api/discord/interactions.ts b/api/discord/interactions.ts index ddea054a..7cc03e15 100644 --- a/api/discord/interactions.ts +++ b/api/discord/interactions.ts @@ -235,8 +235,8 @@ export default async function handler(req: VercelRequest, res: VercelResponse) { } if (commandName === "profile") { - const username = interaction.member?.user?.username; - const discordId = interaction.member?.user?.id; + const username = interaction.user?.username || interaction.member?.user?.username || "Unknown"; + const discordId = interaction.user?.id || interaction.member?.user?.id || "Unknown"; return res.status(200).json({ type: 4,