interactions library

Classes

ArgChoice
Choice that user can pick from. For CommandOptionType.integer or CommandOptionType.string
ArgChoiceBuilder
A specified choice for a slash command argument.
AutocompleteInteractionEvent
ButtonBuilder
Button which will generate event when clicked.
ButtonInteraction
Interaction invoked when button is pressed
ButtonInteractionEvent
Interaction event for button events
CommandOption
An argument for a SlashCommand.
CommandOptionBuilder
An argument for a SlashCommandBuilder.
CommandOptionType
The type that a user should input for a CommandOptionBuilder
ComponentInteraction
Interaction for button, dropdown, etc.
ComponentInteractionEvent<T extends ComponentInteraction>
Generic event for component interactions
ComponentMessageBuilder
Extended MessageBuilder with support for buttons
ComponentRowBuilder
Helper builder to provide fluid api for building component rows
IButtonBuilder
Allows to build button. Generic interface for all types of buttons
ICommandPermissionBuilder
Used to define permissions for a particular command.
ICommandsSync
Used to make multiple methods of checking if the slash commands have been edited since last update
IComponentBuilder
Allows to create components
IInteractionsEndpoints
Interaction
The Interaction data. e.g channel, guild and member
InteractionDataResolved
Additional data for slash command
InteractionEvent<T extends Interaction>
InteractionEventWithAcknowledge<T extends Interaction>
InteractionOption
The option given by the user when sending a command
Interactions
Interaction extension for Nyxx. Allows use of: Slash Commands.
LinkButtonBuilder
Allows to create a button with link
LockFileCommandSync
Manually define command syncing rules
ManualCommandSync
Manually define command syncing rules
MultiselectBuilder
Allows to create multi select interactive components.
MultiselectInteraction
Interaction when multi select is triggered
MultiselectInteractionEvent
Interaction event for dropdown events
MultiselectOptionBuilder
Allows to create multi select option for MultiselectBuilder
PartialChannel
Partial channel object for interactions
RoleCommandPermissionBuilder
A permission for a single role that can be used in SlashCommandBuilder
SlashCommand
Represents slash command that is returned from Discord API.
SlashCommandBuilder
A slash command, can only be instantiated through a method on Interactions
SlashCommandInteraction
Interaction for slash command
SlashCommandInteractionEvent
Event for slash commands
SlashCommandType
Type of the slash command. Since context menus reuses slash commands backed, slash commands cna have different types based on context.
UserCommandPermissionBuilder
A permission for a single user that can be used in SlashCommandBuilder

Properties

slashCommandNameRegex RegExp
Slash command names and subcommands names have to match this regex
final

Typedefs

AutocompleteInteractionHandler = FutureOr<void> Function(AutocompleteInteractionEvent)
Function that will handle execution of button interaction event
ButtonInteractionHandler = FutureOr<void> Function(ButtonInteractionEvent)
Function that will handle execution of button interaction event
MultiselectInteractionHandler = FutureOr<void> Function(MultiselectInteractionEvent)
Function that will handle execution of dropdown event
RawApiMap = Map<String, dynamic>
Typedef of api response
SlashCommandHandler = FutureOr<void> Function(SlashCommandInteractionEvent)
Function that will handle execution of slash command interaction event

Exceptions / Errors

AlreadyRespondedError
Thrown when you have already responded to an interaction
InteractionExpiredError
Thrown when 15 minutes has passed since an interaction was called.
ResponseRequiredError
Thrown when you haven't sent a response yet