Files
ShaiBot/buttons/profile/stats.js
T
2026-08-22 20:27:42 +02:00

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()
});
}
};