Files
ShaiBot/buttons/profile/overview.js
T
2026-08-22 22:46:40 +02:00

48 lines
941 B
JavaScript

const {
buildProfileOverview,
buildProfileButtons,
requireProfileOwner
} = require(
"../../utils/profileSystem"
);
module.exports = {
name:
"profileOverview",
async execute(
interaction
) {
const context =
await requireProfileOwner(
interaction
);
if (!context) {
return;
}
const user =
await interaction.client.users.fetch(
context.profileUserId
);
const embed =
await buildProfileOverview(
interaction.guildId,
user,
context.sessionOwnerId
);
return interaction.update({
embeds: [embed],
components:
buildProfileButtons(
"overview",
0,
1
)
});
}
};