April/commands/misc/document.mjs

65 lines
1.9 KiB
JavaScript
Raw Normal View History

2023-09-13 21:12:45 +02:00
import { SlashCommandBuilder, StringSelectMenuBuilder, ActionRowBuilder } from 'discord.js';
2023-09-13 21:12:45 +02:00
export default {
data: new SlashCommandBuilder()
.setName('documents')
.setDescription('Afficher des documents')
.addSubcommand(subcommand =>
subcommand
.setName('sanctions')
.setDescription('Afficher les documents des sanctions')),
async execute(interaction) {
switch (interaction.options.getSubcommand()) {
case 'sanctions':
await interaction.reply({ components: [sanctionembedrow], ephemeral: true });
break;
}
}
};
const sanctionembedrow = new ActionRowBuilder()
.addComponents(
2023-02-25 10:20:58 +01:00
new StringSelectMenuBuilder()
.setCustomId('document_sanctions')
.setPlaceholder('Navigateur')
.addOptions([
{
label: 'Page 0',
description: 'Couverture',
value: '0',
},
{
label: 'Page 1',
description: 'Notes',
value: '1',
},
{
label: 'Page 2',
description: 'Table des matières',
value: '2',
},
{
label: 'Page 3',
description: 'Articles 1 & 2',
value: '3',
},
{
label: 'Page 4',
description: 'Article 3',
value: '4',
},
{
label: 'Page 5',
description: 'Articles 4 & 5',
value: '5',
},
{
label: 'Page 6',
description: 'Articles 6 & 7',
value: '6',
},
]),
);