ApplicationCommandPermissionsManager

export class ApplicationCommandPermissionsManager<
BaseOptions,
FetchSingleOptions,
GuildType,
CommandIdType,
> extends BaseManager
export class ApplicationCommandPermissionsManager<
BaseOptions,
FetchSingleOptions,
GuildType,
CommandIdType,
> extends BaseManager
Manages API methods for permissions of Application Commands.
NameConstraintsOptionalDefaultDescription
BaseOptionsNoNone
FetchSingleOptionsNoNone
GuildTypeNoNone
CommandIdTypeNoNone
Readonly
client:Client
The client that instantiated this Manager
Inherited from BaseManager
commandId:CommandIdType
The id of the command this manager acts on
guild:GuildType
The guild that this manager acts on
guildId:Snowflake | null
The id of the guild that this manager acts on
add(options):Promise<ApplicationCommandPermissions[]>
Add permissions to a command.
NameTypeOptionalDescription
optionsFetchSingleOptions & EditApplicationCommandPermissionsMixinNoOptions used to add permissions
fetch(options):Promise<ApplicationCommandPermissions[]>
Fetches the permissions for one or multiple commands. Providing the client's id as the "command id" will fetch only* the guild level permissions
NameTypeOptionalDescription
optionsFetchSingleOptionsNoOptions used to fetch permissions
has(options):Promise<boolean>
Check whether a permission exists for a user, role, or channel
NameTypeOptionalDescription
optionsFetchSingleOptions & { permissionId: ApplicationCommandPermissionIdResolvable; permissionType?: ApplicationCommandPermissionType; }NoOptions used to check permissions
remove(options):Promise<ApplicationCommandPermissions[]>
Remove permissions from a command.
NameTypeOptionalDescription
options| (FetchSingleOptions & { token: string; channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; roles?: readonly (RoleResolvable | RolePermissionConstant)[]; users: readonly UserResolvable[]; }) | (FetchSingleOptions & { token: string; channels?: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; roles: readonly (RoleResolvable | RolePermissionConstant)[]; users?: readonly UserResolvable[]; }) | (FetchSingleOptions & { token: string; channels: readonly (GuildChannelResolvable | ChannelPermissionConstant)[]; roles?: readonly (RoleResolvable | RolePermissionConstant)[]; users?: readonly UserResolvable[]; })NoOptions used to remove permissions
set(options):Promise<ApplicationCommandPermissions[]>
Sets the permissions for the guild or a command overwrite.
NameTypeOptionalDescription
optionsFetchSingleOptions & EditApplicationCommandPermissionsMixinNoOptions used to set permissions