You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi we try to use your command handler working well but only : allowWithPermission not working
error :
The argument of type '{ name: string; description: string; commandType: "allGuild"; allowWithPermission: string[]; execute(command: CommandInteraction<CacheType>): Promise<void>; }' is not assignable to the 'SlashCommand' type parameter.
An object literal can only characterize known properties, and 'allowWithPermission' does not exist in type 'RegularSlashCommand'.ts(2345)
exemple use :
export default defineSlashCommand({
name: 'secret',
description: 'Only for server moderators',
// this command is registered in all the
// guilds the bot is in
commandType: 'allGuild',
// this disables the command for anyone who
// doesn't have any of these permissions
allowWithPermission: ['MANAGE_SERVER'],
async execute(command) {
command.reply('Secret moderators stuff')
}
});
The text was updated successfully, but these errors were encountered:
Yes, it has been removed because it was a very slow and inefficient way of handling command permissions.
Discord has now added permissions that you can set from the app itself, go to Server settings > Integrations > your bot name
Hi thx you for your reponse did you know is possible to disable command for everyone for example to block a command ban everyone if don't change perm in discord default is set to everyone and can ban
Hi we try to use your command handler working well but only : allowWithPermission not working
error :
exemple use :
The text was updated successfully, but these errors were encountered: