InteractiveContext class abstract interface

A context that can be interacted with.

You might also be interested in:

Implementers

Constructors

InteractiveContext()

Properties

delegate InteractiveContext?
The delegate of this context.
no setter
hashCode int
The hash code for this object.
no setterinherited
latestContext InteractiveContext
The youngest context that handles all interactions.
no setter
parent InteractiveContext?
The parent of this context.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

awaitButtonPress(ComponentId componentId) Future<ButtonComponentContext>
Wait for a user to press a button and return a context representing that button press.
awaitMultiSelection<T>(ComponentId componentId, {Converter<T>? converterOverride}) Future<SelectMenuContext<List<T>>>
Wait for a user to select options from a multi-select menu and return a context representing that selection.
awaitSelection<T>(ComponentId componentId, {Converter<T>? converterOverride}) Future<SelectMenuContext<T>>
Wait for a user to select a single option from a multi-select menu and return a context representing that selection.
getButtonPress(Message message) Future<ButtonComponentContext>
Wait for a user to press on any button on a given message and return a context representing the button press.
getButtonSelection<T>(List<T> values, MessageBuilder builder, {Map<T, ButtonStyle>? styles, bool authorOnly = true, ResponseLevel? level, Duration? timeout, FutureOr<ButtonBuilder> toButton(T)?, Converter<T>? converterOverride}) Future<T>
Get a selection from a user, presenting the options as an array of buttons.
getConfirmation(MessageBuilder builder, {Map<bool, String> values = const {true : 'Yes', false : 'No'}, Map<bool, ButtonStyle> styles = const {true : ButtonStyle.success, false : ButtonStyle.danger}, bool authorOnly = true, ResponseLevel? level, Duration? timeout}) Future<bool>
Present the user with two options and return whether the positive one was clicked.
getMultiSelection<T>(List<T> choices, MessageBuilder builder, {ResponseLevel? level, Duration? timeout, bool authorOnly = true, FutureOr<SelectMenuOptionBuilder> toSelectMenuOption(T)?, Converter<T>? converterOverride}) Future<List<T>>
Present the user with a drop-down menu of choices and return the selected choices.
getSelection<T>(List<T> choices, MessageBuilder builder, {ResponseLevel? level, Duration? timeout, bool authorOnly = true, FutureOr<SelectMenuOptionBuilder> toSelectMenuOption(T)?, Converter<T>? converterOverride}) Future<T>
Present the user with a drop-down menu of choices and return the selected choice.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
respond(MessageBuilder builder, {ResponseLevel? level}) Future<Message>
Send a response to the command.
toString() String
A string representation of this object.
inherited

Operators

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