SlashCommandBuilder class Null safety

A slash command, can only be instantiated through a method on Interactions

Inheritance

Constructors

SlashCommandBuilder(String name, String? description, List<CommandOptionBuilder> options, {bool defaultPermissions = true, List<ICommandPermissionBuilder>? permissions, Snowflake? guild, SlashCommandType type = SlashCommandType.chat})
A slash command, can only be instantiated through a method on Interactions

Properties

defaultPermissions bool
If people can use the command by default or if they need permissions to use it.
final
description String?
Command description shown to the user in the Slash Command UI
final
guild Snowflake?
The guild that the slash Command is registered in. This can be null if its a global command.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
name String
Command name to be shown to the user in the Slash Command UI
final
options List<CommandOptionBuilder>
The arguments that the command takes
read / write
permissions List<ICommandPermissionBuilder>?
Permission overrides for the command
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type SlashCommandType
Target of slash command if different that SlashCommandTarget.chat - slash command will become context menu in appropriate context
read / write

Methods

addPermission(ICommandPermissionBuilder permission) → void
Register a permission
build() RawApiMap
Returns built response for api
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
registerHandler(SlashCommandHandler handler) → void
Registers handler for command. Note command cannot have handler if there are options present
toString() String
A string representation of this object. [...]
inherited

Operators

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