diff options
Diffstat (limited to 'bot/src/commands/userinfo.js')
| -rw-r--r-- | bot/src/commands/userinfo.js | 21 |
1 files changed, 21 insertions, 0 deletions
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]}); + } +}; |
