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.

Properties

CheckMode

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

RoleNames

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

Methods

ExecuteCheckAsync(CommandContext, bool)

Executes the a check.