2023-09-13 21:12:45 +02:00
|
|
|
import { SlashCommandBuilder, StringSelectMenuBuilder, ActionRowBuilder } from 'discord.js';
|
2022-11-09 14:44:05 +01:00
|
|
|
|
2023-09-13 21:12:45 +02:00
|
|
|
export default {
|
2022-11-09 14:44:05 +01:00
|
|
|
data: new SlashCommandBuilder()
|
|
|
|
.setName('documents')
|
|
|
|
.setDescription('Afficher des documents')
|
2022-12-16 08:54:38 +01:00
|
|
|
.addSubcommand(subcommand =>
|
|
|
|
subcommand
|
|
|
|
.setName('sanctions')
|
|
|
|
.setDescription('Afficher les documents des sanctions')),
|
2022-11-09 14:44:05 +01:00
|
|
|
|
|
|
|
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()
|
2022-11-09 14:44:05 +01:00
|
|
|
.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',
|
|
|
|
},
|
|
|
|
]),
|
|
|
|
);
|