Hey guys, I have a command that looks like the follow:
module.exports = {
data: new SlashCommandBuilder()
.setName('moderation')
.setDescription('Moderation utility tools')
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
.addSubcommand((subcommand) =>
subcommand
.setName('purge')
.setDescription('Removes {n} number of messages')
.addNumberOption((option) =>
option.setRequired(true).setName('n').setDescription('Amount of messages, max 100')
)
),
async execute(interaction: CommandInteraction) {
try {
await purgeMessages(interaction)
ephemeral: true })
} catch (error) {
console.log('❌ ERROR: moderation(): ', error)
}
},
}
Is there any specific reason for the .setDefaultMemberPermissions(PermissionFlagsBits.Administrator) to not work correctly? Seems that everyone has the option to use it, I was expecting it to only work with Admin privileged
Discord.JS V13.6.0