Skip to content

Commit

Permalink
Merge pull request #17 from andrewstech/main
Browse files Browse the repository at this point in the history
chore: Refactor decode command to use embed for user information display
  • Loading branch information
andrewstech authored Jul 19, 2024
2 parents 3dfa56e + 878bd93 commit 12dffe5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion commands/decode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 12dffe5

Please sign in to comment.