Interactions class Null safety

Interaction extension for Nyxx. Allows use of: Slash Commands.

Constructors

Interactions(Nyxx client)
Create new instance of the interactions class.

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
onSlashCommand Stream<InteractionEvent>
Emitted when a slash command is sent.
read / write, final, late
onSlashCommandCreated Stream<SlashCommand>
Emitted when a slash command is created by the user.
read / write, final, late
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createCommand(String name, String description, List<CommandArg> args, {Snowflake? guild}) SlashCommand
Creates a command that can be registered using .registerCommand or .registerCommands [...]
getCommands({bool registeredOnly = false}) List<SlashCommand>
Gets all the commands that are currently registered.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
registerCommand(SlashCommand command) → void
Registers a single command. [...]
registerCommands(List<SlashCommand> commands) → void
Registers multiple commands at one. [...]
sync() Future<void>
Syncs the local commands with the discord API
toString() String
A string representation of this object. [...]
inherited

Operators

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