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

commands Iterable<SlashCommand>
Commands registered by bot
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
interactionsEndpoints IInteractionsEndpoints
All interaction endpoints that can be accessed.
late, final
onAutocompleteEvent Stream<AutocompleteInteractionEvent>
Emitted when a slash command is created by the user.
late, final
onButtonEvent Stream<ButtonInteractionEvent>
Emitted when a button interaction is received.
late, final
onMultiselectEvent Stream<MultiselectInteractionEvent>
Emitted when a dropdown interaction is received.
late, final
onSlashCommand Stream<SlashCommandInteractionEvent>
Emitted when a slash command is sent.
late, final
onSlashCommandCreated Stream<SlashCommand>
Emitted when a slash command is created by the user.
late, final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

deleteGlobalCommand(Snowflake commandId) Future<void>
Deletes global command
deleteGuildCommand(Snowflake commandId, Snowflake guildId) Future<void>
Deletes guild command
fetchGlobalCommands() Stream<SlashCommand>
Fetches all global bots command
fetchGuildCommands(Snowflake guildId) Stream<SlashCommand>
Fetches all guild commands for given guild
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
registerAutocompleteHandler(String id, AutocompleteInteractionHandler handler) → void
Registers callback for button event for given id
registerButtonHandler(String id, ButtonInteractionHandler handler) → void
Registers callback for button event for given id
registerMultiselectHandler(String id, MultiselectInteractionHandler handler) → void
Register callback for dropdown event for given id
registerSlashCommand(SlashCommandBuilder slashCommandBuilder) → void
Allows to register new SlashCommandBuilder
registerSlashCommandHandler(String id, SlashCommandHandler handler) → void
Register callback for slash command event for given id
sync({ICommandsSync syncRule = const ManualCommandSync()}) Future<void>
Syncs command builders with discord immediately. Warning: Client could not be ready at the function execution. Use syncOnReady for proper behavior
syncOnReady({ICommandsSync syncRule = const ManualCommandSync()}) → void
Syncs commands builders with discord after client is ready.
toString() String
A string representation of this object. [...]
inherited

Operators

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