added new logic to the new rewards

This commit is contained in:
DeSqBlocki
2026-08-23 00:43:43 +02:00
parent 4d858554be
commit 425686ec40
15 changed files with 1644 additions and 2662 deletions
+33 -20
View File
@@ -1,34 +1,47 @@
const {
requireProfileOwner,
buildProfileStatsEmbed,
buildProfileButtons
} = require("../../utils/profileSystem");
buildStatsEmbed,
buildProfileButtons,
requireProfileOwner
} = require(
"../../utils/profileSystem"
);
module.exports = {
name: "profileStats",
name:
"profileStats",
async execute(interaction) {
const session = await requireProfileOwner(
interaction
);
async execute(
interaction
) {
const context =
await requireProfileOwner(
interaction
);
if (!session) {
if (!context) {
return;
}
const user = await interaction.client.users.fetch(
session.profileUserId
);
const user =
await interaction.client.users.fetch(
context.profileUserId
);
const embed = await buildProfileStatsEmbed(
interaction.guildId,
user,
session.sessionOwnerId
);
const embed =
await buildStatsEmbed(
interaction.guildId,
user,
context.sessionOwnerId
);
return interaction.update({
embeds: [embed],
components: buildProfileButtons()
components:
buildProfileButtons(
"stats",
0,
1
)
});
}
};
};