Table of Contents

Constructor RequireRolesAttribute

Namespace
DSharpPlus.CommandsNext.Attributes
Assembly
DSharpPlus.CommandsNext.dll

RequireRolesAttribute(RoleCheckMode, params string[])

Defines that usage of this command is restricted to members with specified role. Note that it's much preferred to restrict access using RequirePermissionsAttribute.

public RequireRolesAttribute(RoleCheckMode checkMode, params string[] roleNames)

Parameters

checkMode RoleCheckMode

Role checking mode.

roleNames string[]

Names of the role to be verified by this check.

RequireRolesAttribute(RoleCheckMode, params ulong[])

Defines that usage of this command is restricted to members with the specified role. Note that it is much preferred to restrict access using RequirePermissionsAttribute.

public RequireRolesAttribute(RoleCheckMode checkMode, params ulong[] roleIds)

Parameters

checkMode RoleCheckMode

Role checking mode.

roleIds ulong[]

IDs of the roles to be verified by this check.

RequireRolesAttribute(RoleCheckMode, string[], ulong[])

Defines that usage of this command is restricted to members with the specified role. Note that it is much preferred to restrict access using RequirePermissionsAttribute.

public RequireRolesAttribute(RoleCheckMode checkMode, string[] roleNames, ulong[] roleIds)

Parameters

checkMode RoleCheckMode

Role checking mode.

roleNames string[]

Names of the role to be verified by this check.

roleIds ulong[]

IDs of the roles to be verified by this check.