From 878bd93a2a08c5ed54a39f982d9f8671d6479335 Mon Sep 17 00:00:00 2001 From: andrewstech Date: Fri, 19 Jul 2024 18:13:26 +0000 Subject: [PATCH] chore: Refactor decode command to use embed for user information display --- commands/decode.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/commands/decode.js b/commands/decode.js index b80a794..5d51fa9 100644 --- a/commands/decode.js +++ b/commands/decode.js @@ -43,7 +43,13 @@ module.exports = { const secretKey = process.env.ENCRYPTION_KEY; const decodeKey = secretKey + id; const decoded = jwt.verify(key, decodeKey); - await interaction.editReply({ content: `Decoded: ${JSON.stringify(decoded)}` }); + + const embed = new EmbedBuilder() + .setTitle("User Information") + .setColor("#0096ff") + .setDescription(`**Key:** ${key}\n**Decoded:** ${JSON.stringify(decoded)}`); + + await interaction.editReply({ embeds: [embed] }); } catch (error) { console.error("Error performing lookup:", error);