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
+51 -34
View File
@@ -1,46 +1,63 @@
const { SlashCommandBuilder } = require("discord.js");
const {
SlashCommandBuilder
} = require(
"discord.js"
);
const {
buildProfileOverview,
buildProfileButtons
} = require("../../utils/profileSystem");
const {
createInteractionSession
} = require("../../utils/interactionSession");
} = require(
"../../utils/profileSystem"
);
module.exports = {
data: new SlashCommandBuilder()
.setName("profile")
.setDescription("View a player profile")
.addUserOption(option =>
option
.setName("user")
.setDescription("Player to view")
),
data:
new SlashCommandBuilder()
.setName(
"profile"
)
.setDescription(
"View a player profile"
)
.addUserOption(
option =>
option
.setName(
"user"
)
.setDescription(
"Player to view"
)
),
async execute(interaction) {
const user = interaction.options.getUser("user") ?? interaction.user;
async execute(
interaction
) {
const user =
interaction.options.getUser(
"user"
) ??
interaction.user;
const embed = await buildProfileOverview(
interaction.guildId,
user,
interaction.user.id
);
const sessionOwnerId =
interaction.user.id;
await interaction.reply({
const embed =
await buildProfileOverview(
interaction.guildId,
user,
sessionOwnerId
);
return interaction.reply({
embeds: [embed],
components: buildProfileButtons()
components:
buildProfileButtons(
"overview",
0,
1
)
});
const message = await interaction.fetchReply();
await createInteractionSession(
interaction,
{
messageId: message.id,
ownerId: interaction.user.id,
kind: "profile",
targetId: user.id
}
);
}
};