added bankruptcy

This commit is contained in:
DeSqBlocki
2026-08-23 00:09:13 +02:00
parent 030b4b8883
commit 9c867b1adb
12 changed files with 985 additions and 676 deletions
+34 -51
View File
@@ -1,63 +1,46 @@
const {
SlashCommandBuilder
} = require(
"discord.js"
);
const { SlashCommandBuilder } = require("discord.js");
const {
buildProfileOverview,
buildProfileButtons
} = require(
"../../utils/profileSystem"
);
} = require("../../utils/profileSystem");
const {
createInteractionSession
} = require("../../utils/interactionSession");
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 sessionOwnerId =
interaction.user.id;
const embed = await buildProfileOverview(
interaction.guildId,
user,
interaction.user.id
);
const embed =
await buildProfileOverview(
interaction.guildId,
user,
sessionOwnerId
);
return interaction.reply({
await interaction.reply({
embeds: [embed],
components:
buildProfileButtons(
"overview",
0,
1
)
components: buildProfileButtons()
});
const message = await interaction.fetchReply();
await createInteractionSession(
interaction,
{
messageId: message.id,
ownerId: interaction.user.id,
kind: "profile",
targetId: user.id
}
);
}
};