feat(polls): add poll command skeleton
Refs: #82 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 file changed
+34
@@ -0,0 +1,34 @@
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import { ACCESS_LEVELS } from '../../config/constants.js';
|
||||
import { notImplementedEmbed } from '../../ui/embeds.js';
|
||||
|
||||
export const access = ACCESS_LEVELS.STAFF;
|
||||
|
||||
export const data = new SlashCommandBuilder()
|
||||
.setName('poll')
|
||||
.setDescription('Sondages')
|
||||
.addSubcommand((sub) =>
|
||||
sub
|
||||
.setName('create')
|
||||
.setDescription('Créer un sondage')
|
||||
.addStringOption((option) =>
|
||||
option.setName('question').setDescription('Question').setRequired(true).setMaxLength(200),
|
||||
)
|
||||
.addStringOption((option) =>
|
||||
option.setName('choices').setDescription('Choix séparés par ";" (2 à 10)').setRequired(true),
|
||||
)
|
||||
.addIntegerOption((option) =>
|
||||
option.setName('minutes').setDescription('Durée en minutes').setMinValue(1).setMaxValue(10_080),
|
||||
),
|
||||
)
|
||||
.addSubcommand((sub) =>
|
||||
sub
|
||||
.setName('close')
|
||||
.setDescription('Fermer un sondage')
|
||||
.addIntegerOption((option) => option.setName('id').setDescription('ID du sondage').setRequired(true)),
|
||||
);
|
||||
|
||||
// TODO(M10-T01..T06): implement with polls / poll_votes tables.
|
||||
export async function execute(interaction) {
|
||||
await interaction.reply({ embeds: [notImplementedEmbed(`/poll ${interaction.options.getSubcommand()}`)] });
|
||||
}
|
||||
Reference in new issue
Block a user