From cf2565d88cd89dc1ab51fb627223bafea036b0fe Mon Sep 17 00:00:00 2001 From: nocode Date: Sun, 13 Sep 2026 12:19:13 +0200 Subject: [PATCH] feat(moderation): add mute command skeleton Refs: #66 Co-Authored-By: Claude Opus 5 (1M context) --- src/commands/moderation/mute.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/commands/moderation/mute.js diff --git a/src/commands/moderation/mute.js b/src/commands/moderation/mute.js new file mode 100644 index 0000000..2335b9a --- /dev/null +++ b/src/commands/moderation/mute.js @@ -0,0 +1,25 @@ +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('mute') + .setDescription('Restreindre temporairement un membre') + .setDefaultMemberPermissions(PermissionFlagsBits.ModerateMembers) + .addUserOption((option) => option.setName('user').setDescription('Membre').setRequired(true)) + .addIntegerOption((option) => + option + .setName('minutes') + .setDescription('Durée en minutes') + .setRequired(true) + .setMinValue(1) + .setMaxValue(40_320), + ) + .addStringOption((option) => option.setName('reason').setDescription('Raison').setMaxLength(500)); + +// TODO(M8-T02 / M8-T07): use member.timeout() after canActOn() check. +export async function execute(interaction) { + await interaction.reply({ embeds: [notImplementedEmbed('/mute')] }); +}