23 lines
557 B
JavaScript
23 lines
557 B
JavaScript
const {
|
|
buildStatsEmbed,
|
|
buildProfileButtons,
|
|
getProfileTargetId
|
|
} = require("../../utils/profileSystem");
|
|
|
|
module.exports = {
|
|
name: "profileStats",
|
|
|
|
async execute(interaction) {
|
|
const userId = getProfileTargetId(interaction);
|
|
if (!userId) return;
|
|
|
|
const user = await interaction.client.users.fetch(userId);
|
|
const embed = await buildStatsEmbed(interaction.guildId, user);
|
|
|
|
return interaction.update({
|
|
embeds: [embed],
|
|
components: buildProfileButtons()
|
|
});
|
|
}
|
|
};
|