CommandOptionBuilder class Null safety

An argument for a SlashCommandBuilder.

Implemented types

Constructors

CommandOptionBuilder(CommandOptionType type, String name, String description, {bool defaultArg = false, bool required = false, List<ArgChoiceBuilder>? choices, List<CommandOptionBuilder>? options})
Used to create an argument for a SlashCommandBuilder.

Properties

choices List<ArgChoiceBuilder>?
Choices for CommandOptionType.string and CommandOptionType.string types for the user to pick from
read / write
defaultArg bool
If this should be the fist required option the user picks
read / write
description String
The description of your argument / sub-group.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
name String
The name of your argument / sub-group.
final
options List<CommandOptionBuilder>?
If the option is a subcommand or subcommand group type, this nested options will be the parameters
read / write
required bool
If this argument is required
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type CommandOptionType
The type of arg that will be later changed to an INT value, their values can be seen in the table below: | Name | Value | |-------------------|-------| | SUB_COMMAND | 1 | | SUB_COMMAND_GROUP | 2 | | STRING | 3 | | INTEGER | 4 | | BOOLEAN | 5 | | USER | 6 | | CHANNEL | 7 | | ROLE | 8 |
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
registerHandler(SlashCommandHandler handler) → void
Registers handler for subcommand
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited