34 lines
735 B
JavaScript
34 lines
735 B
JavaScript
const {
|
|
requireProfileOwner,
|
|
buildProfileStatsEmbed,
|
|
buildProfileButtons
|
|
} = require("../../utils/profileSystem");
|
|
|
|
module.exports = {
|
|
name: "profileStats",
|
|
|
|
async execute(interaction) {
|
|
const session = await requireProfileOwner(
|
|
interaction
|
|
);
|
|
|
|
if (!session) {
|
|
return;
|
|
}
|
|
|
|
const user = await interaction.client.users.fetch(
|
|
session.profileUserId
|
|
);
|
|
|
|
const embed = await buildProfileStatsEmbed(
|
|
interaction.guildId,
|
|
user,
|
|
session.sessionOwnerId
|
|
);
|
|
|
|
return interaction.update({
|
|
embeds: [embed],
|
|
components: buildProfileButtons()
|
|
});
|
|
}
|
|
}; |