Class RequireBotPermissionsAttribute
- Namespace
- DSharpPlus.CommandsNext.Attributes
- Assembly
- DSharpPlus.CommandsNext.dll
Defines that usage of this command is only possible when the bot is granted a specific permission.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class RequireBotPermissionsAttribute : CheckBaseAttribute
- Inheritance
-
objectAttributeRequireBotPermissionsAttribute
Constructors
- RequireBotPermissionsAttribute(bool, params DiscordPermission[])
Defines that usage of this command is only possible when the bot is granted a specific permission.
Properties
- IgnoreDms
Gets 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
- ExecuteCheckAsync(CommandContext, bool)
Asynchronously checks whether this command can be executed within given context.