diff options
| author | Andrew Lee <andrew@alee14.me> | 2025-03-02 22:27:57 -0500 |
|---|---|---|
| committer | Andrew Lee <andrew@alee14.me> | 2025-03-02 22:27:57 -0500 |
| commit | cf1382d88c5e3298923c8cb243b7bc5751e68b53 (patch) | |
| tree | a38351317594ed660fc80c784cdf7dbc71f5656b /bot/src/commands/userinfo.js | |
| parent | 1c253d25cb1d35aa987d76e07806999c562712d6 (diff) | |
| download | AleeBot-cf1382d88c5e3298923c8cb243b7bc5751e68b53.tar.gz AleeBot-cf1382d88c5e3298923c8cb243b7bc5751e68b53.tar.bz2 AleeBot-cf1382d88c5e3298923c8cb243b7bc5751e68b53.zip | |
Ported more commands; Made embed colour a const; Cleanup
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]}); + } +}; |
