I've been trying to make a bot and i discovered the setdefaultmemberpermission, but it doesn't seem to work for me. Could someone help out please? When i execute the command without the administrator permission, it still allows me to do the command.
Here is my code:
const { SlashCommandBuilder, PermissionFlagsBits } = require('discord.js');
module.exports = {
data: new SlashCommandBuilder()
.setName('embed')
.setDescription('Sends a embed!')
.setDefaultMemberPermissions(PermissionFlagsBits.ADMINISTRATOR),
Change this:
PermissionFlagsBits.ADMINISTRATOR
To this:
PermissionFlagsBits.Administrator
Reference: PermissionsBitFeld#Flags, PermissionFlagBits