Class CommandBuilder
- Namespace
- DSharpPlus.CommandsNext.Builders
- Assembly
- DSharpPlus.CommandsNext.dll
Represents an interface to build a command.
public class CommandBuilder
- Inheritance
-
CommandBuilder
- Derived
Constructors
- CommandBuilder()
Creates a new module-less command builder.
- CommandBuilder(ICommandModule?)
Creates a new command builder.
Properties
- Aliases
Gets the aliases set for this command.
- Category
Gets the category set for this command.
- CustomAttributes
Gets custom attributes defined on this command.
- Description
Gets the description set for this command.
- ExecutionChecks
Gets the execution checks defined for this command.
- IsHidden
Gets whether this command will be hidden or not.
- Module
Gets the module on which this command is to be defined.
- Name
Gets the name set for this command.
- Overloads
Gets the collection of this command's overloads.
Methods
- WithAlias(string)
Adds an alias to this command.
- WithAliases(params string[])
Adds aliases to this command.
- WithCategory(string?)
Sets the category for this command.
- WithCustomAttribute(Attribute)
Adds a custom attribute to this command. This can be used to indicate various custom information about a command.
- WithCustomAttributes(params Attribute[])
Adds multiple custom attributes to this command. This can be used to indicate various custom information about a command.
- WithDescription(string)
Sets the description for this command.
- WithExecutionCheck(CheckBaseAttribute)
Adds a pre-execution check to this command.
- WithExecutionChecks(params CheckBaseAttribute[])
Adds pre-execution checks to this command.
- WithHiddenStatus(bool)
Sets whether this command is to be hidden.
- WithName(string)
Sets the name for this command.
- WithOverload(CommandOverloadBuilder)
Adds an overload to this command. An executable command needs to have at least one overload.
- WithOverloads(params CommandOverloadBuilder[])
Adds overloads to this command. An executable command needs to have at least one overload.