Table of Contents

Class RequirePrefixesAttribute

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

Defines that usage of this command is only allowed with specific prefixes.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class RequirePrefixesAttribute : CheckBaseAttribute
Inheritance
object
Attribute
RequirePrefixesAttribute

Constructors

RequirePrefixesAttribute(params string[])

Defines that usage of this command is only allowed with specific prefixes.

Properties

Prefixes

Gets the array of prefixes with which execution of this command is allowed.

ShowInHelp

Gets or sets default help behaviour for this check. When this is enabled, invoking help without matching prefix will show the commands.

Defaults to false.

Methods

ExecuteCheckAsync(CommandContext, bool)

Asynchronously checks whether this command can be executed within given context.