Class RequireBotPermissionsAttribute
Defines that usage of this command is only possible when the bot is granted a specific permission.
Namespace: DSharpPlus.CommandsNext.Attributes
Assembly: cs.temp.dll.dll
Syntax
public sealed class RequireBotPermissionsAttribute : CheckBaseAttribute
Constructors
RequireBotPermissionsAttribute(Permissions)
Defines that usage of this command is only possible when the bot is granted a specific permission.
Declaration
public RequireBotPermissionsAttribute(Permissions permissions)
Parameters
Type | Name | Description |
---|---|---|
Permissions | permissions | Permissions required to execute this command. |
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.
Declaration
public bool IgnoreDms { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Permissions
Gets the permissions required by this attribute.
Declaration
public Permissions Permissions { get; }
Property Value
Type | Description |
---|---|
Permissions |
Methods
ExecuteCheckAsync(CommandContext, Boolean)
Declaration
public override Task<bool> ExecuteCheckAsync(CommandContext ctx, bool help)
Parameters
Type | Name | Description |
---|---|---|
CommandContext | ctx | |
System.Boolean | help |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |