Setting the default permission for commands built using discord.js builders.

I'm trying to use <SlashCommandBuilder>.setDefaultMemberPermissions('0') to disallow members to use that command by default, but it's not working. Could it be because this command is registered on a guild instead of globally? I'm using @discordjs/builders@0.16.0-dev.1657757509-fe34f48
5 Replies
Jaworek
Jaworek3y ago
i think '0' will disallow everyone to use command but any one with perms can use it
Teixeira
Teixeira3y ago
Oh, so what would be the correct value?
Teixeira
Teixeira3y ago
Discord Developer Portal
Discord Developer Portal — API Docs for Bots and Developers
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Teixeira
Teixeira3y ago
Discord.js
Discord.js is a powerful node.js module that allows you to interact with the Discord API very easily. It takes a much more object-oriented approach than most other JS Discord libraries, making your bot's code significantly tidier and easier to comprehend.
Teixeira
Teixeira3y ago
But yeah makes sense since it's probably based off the first one Tried it, still doesn't work (@everyone can still use the command by default) Well on boot my bot is registering every command again Probably not the smartest way to go about it But yeah technically a command with the same name already existed I see, okay so kicking the bot and re-adding it, then booting it up should work? Got it, trying
Want results from more Discord servers?
Add your server