Table of Contents

Constructor SlashRequirePermissionsAttribute

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

SlashRequirePermissionsAttribute(bool, params DiscordPermission[])

Defines that usage of this command is restricted to members with specified permissions. This check also verifies that the bot has the same permissions.

public SlashRequirePermissionsAttribute(bool ignoreDms = true, params DiscordPermission[] permissions)

Parameters

ignoreDms bool

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 DiscordPermission[]

Permissions required to execute this command.