Files
ShaiBot/commands/applications/records.js
T
2026-08-22 23:33:20 +02:00

62 lines
1.4 KiB
JavaScript

const {
SlashCommandBuilder
} = require("discord.js");
const {
buildRecordsEmbed,
getRecordChoices
} = require(
"../../utils/profileRecords"
);
module.exports = {
data:
new SlashCommandBuilder()
.setName(
"records"
)
.setDescription(
"View Shai Cookie and Crumb Saucer records"
)
.addStringOption(
option =>
option
.setName(
"category"
)
.setDescription(
"Record category"
)
.setRequired(
true
)
.addChoices(
...getRecordChoices()
)
),
async execute(
interaction
) {
const category =
interaction.options.getString(
"category",
true
);
const embed =
await buildRecordsEmbed({
guildId:
interaction.guildId,
category,
botUserId:
interaction.client.user.id,
limit: 10
});
return interaction.reply({
embeds: [embed]
});
}
};