Table of Contents

Class RequireRolesAttribute

Namespace
DisCatSharp.CommandsNext.Attributes
Assembly
DisCatSharp.CommandsNext.dll

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

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, Inherited = false)]
public sealed class RequireRolesAttribute : CheckBaseAttribute
Inheritance
RequireRolesAttribute
Inherited Members

Constructors

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.

RequireRolesAttribute(RoleCheckMode, params ulong[])

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

Properties

CheckMode

Gets the role checking mode. Refer to RoleCheckMode for more information.

RoleIds

Gets the ids of the role required to execute this command.

RoleNames

Gets the name of the role required to execute this command.

UsesRoleIds

Gets whether role ids are used.

Methods

ExecuteCheckAsync(CommandContext, bool)

Executes the a check.