Table of Contents

Class SlashRequireBotPermissionsAttribute

Namespace
DSharpPlus.SlashCommands.Attributes
Assembly
DSharpPlus.SlashCommands.dll

Defines that usage of this slash command is only possible when the bot is granted a specific permission.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class SlashRequireBotPermissionsAttribute : SlashCheckBaseAttribute
Inheritance
SlashRequireBotPermissionsAttribute

Constructors

SlashRequireBotPermissionsAttribute(bool, params DiscordPermission[])

Defines that usage of this slash command is only possible when the bot is granted a specific permission.

Properties

IgnoreDms

Gets or sets this check's behaviour in DMs. True means the check will always pass in DMs, whereas false means that it will always fail.

Permissions

Gets the permissions required by this attribute.

Methods

ExecuteChecksAsync(InteractionContext)

Runs checks.