Table of Contents

Class CommandBuilder

Namespace
NetCord.Services.Commands
Assembly
NetCord.Services.dll

Commands are text-based commands that can be invoked by users in a chat by sending a message, typically starting with a prefix.

public class CommandBuilder : ICommandBuilder
Inheritance
CommandBuilder
Implements
Inherited Members

Constructors

CommandBuilder(IEnumerable<string>, Delegate)

Commands are text-based commands that can be invoked by users in a chat by sending a message, typically starting with a prefix.

public CommandBuilder(IEnumerable<string> aliases, Delegate handler)

Parameters

aliases IEnumerable<string>
Aliases of the command.
handler Delegate
Handler that represents the body of the command.

Properties

Aliases

Aliases of the command.

public IEnumerable<string> Aliases { get; }

Property Value

IEnumerable<string>

Handler

Handler that represents the body of the command.

public Delegate Handler { get; }

Property Value

Delegate

Priority

Priority of the command. Commands are matched in order of descending priority, and the first command that matches the input is executed. Higher values indicate higher priority.

public int Priority { get; set; }

Property Value

int

Methods

WithPriority(int)

Priority of the command. Commands are matched in order of descending priority, and the first command that matches the input is executed. Higher values indicate higher priority.

public CommandBuilder WithPriority(int priority)

Parameters

priority int

Returns

CommandBuilder