From cf1382d88c5e3298923c8cb243b7bc5751e68b53 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 2 Mar 2025 22:27:57 -0500 Subject: Ported more commands; Made embed colour a const; Cleanup --- bot/src/commands/userinfo.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 bot/src/commands/userinfo.js (limited to 'bot/src/commands/userinfo.js') diff --git a/bot/src/commands/userinfo.js b/bot/src/commands/userinfo.js new file mode 100644 index 0000000..01b7577 --- /dev/null +++ b/bot/src/commands/userinfo.js @@ -0,0 +1,21 @@ +import { SlashCommandBuilder, EmbedBuilder } from 'discord.js'; +import { abEmbedColour } from '../storage/consts.js'; + +export default { + data: new SlashCommandBuilder() + .setName('userinfo') + .setDescription('Information about a user.'), + async execute(interaction) { + const userEmbed = new EmbedBuilder() + .setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL() }) + .setDescription('User Information') + .setThumbnail(interaction.user.avatarURL()) + .addFields( + { name: 'Names', value: `**Display Name:** ${interaction.member.displayName}\n**Username:** ${interaction.user.username}`}, + { name: 'Identity', value: `**User ID:** ${interaction.user.id}` }, + { name: 'Create and Join Times', value: `**Created At:** ${interaction.member.user.createdAt.toUTCString()}\n**Joined Guild At:** ${interaction.member.joinedAt.toUTCString()}`} + ) + .setColor(abEmbedColour); + return await interaction.reply({embeds: [userEmbed]}); + } +}; -- cgit v1.2.3