From dc4958fa26d2ad7e17b9a1f35089469a0cb70dfd Mon Sep 17 00:00:00 2001 From: nocode Date: Sun, 13 Sep 2026 12:19:13 +0200 Subject: [PATCH] feat(moderation): add clear command skeleton Refs: #69 --- src/commands/moderation/clear.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/commands/moderation/clear.js diff --git a/src/commands/moderation/clear.js b/src/commands/moderation/clear.js new file mode 100644 index 0000000..813ac78 --- /dev/null +++ b/src/commands/moderation/clear.js @@ -0,0 +1,23 @@ +import { PermissionFlagsBits, 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('clear') + .setDescription('Supprimer des messages') + .setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages) + .addIntegerOption((option) => + option + .setName('amount') + .setDescription('Nombre de messages') + .setRequired(true) + .setMinValue(1) + .setMaxValue(100), + ); + +// TODO(M8-T05): channel.bulkDelete(amount, true) and log the action. +export async function execute(interaction) { + await interaction.reply({ embeds: [notImplementedEmbed('/clear')] }); +}