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')] }); +}