From cc06b8ed4e4e0aef02dfd8ab15df22a57a177a0a Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 4 Mar 2025 10:05:14 -0500 Subject: Readme change; Docker; Logging --- bot/src/commands/userinfo.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'bot/src/commands/userinfo.js') diff --git a/bot/src/commands/userinfo.js b/bot/src/commands/userinfo.js index b51ef0a..c079661 100644 --- a/bot/src/commands/userinfo.js +++ b/bot/src/commands/userinfo.js @@ -4,16 +4,22 @@ import { abEmbedColour } from '../storage/consts.js'; export default { data: new SlashCommandBuilder() .setName('userinfo') - .setDescription('Information about a user.'), + .setDescription('Information about a user.') + .addUserOption(option => + option + .setName('username') + .setDescription('The user to get the information of')), async execute(interaction) { + const username = interaction.options.getUser('username') || interaction.user; + const member = interaction.guild.members.cache.get(username.id); const userEmbed = new EmbedBuilder() - .setAuthor({ name: interaction.user.tag, iconURL: interaction.user.avatarURL() }) + .setAuthor({ name: username.tag, iconURL: username.avatarURL() }) .setDescription('User Information') - .setThumbnail(interaction.user.avatarURL()) + .setThumbnail(username.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()}`} + { name: 'Names', value: `**Display Name:** ${member.displayName}\n**Username:** ${username.username}`}, + { name: 'Identity', value: `**User ID:** ${username.id}` }, + { name: 'Create and Join Times', value: `**Created At:** ${username.createdAt.toUTCString()}\n**Joined Guild At:** ${member.joinedAt.toUTCString()}`} ) .setColor(abEmbedColour); return await interaction.reply({ embeds: [userEmbed] }); -- cgit v1.2.3