ContextManager class

Exposes methods for creating contexts from the raw event dispatched from Discord.

You do not need to create this class yourself; it is exposed through CommandsPlugin.contextManager.

Constructors

ContextManager(CommandsPlugin commands)
Create a new ContextManager attached to a CommandsPlugin.

Properties

commands CommandsPlugin
The CommandsPlugin this ContextManager is attached to.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createAutocompleteContext(ApplicationCommandAutocompleteInteraction interaction, ChatCommand command) Future<AutocompleteContext>
Create an AutocompleteContext from an ApplicationCommandAutocompleteInteraction.
createButtonComponentContext(MessageComponentInteraction interaction) Future<ButtonComponentContext>
Create a ButtonComponentContext from a MessageComponentInteraction.
createInteractionChatContext(ApplicationCommandInteraction interaction, List<InteractionOption> options, ChatCommand command) Future<InteractionChatContext>
Create an InteractionChatContext from an ApplicationCommandInteraction.
createMessageChatContext(Message message, StringView contentView, String prefix) Future<MessageChatContext>
Create a MessageChatContext from a Message.
createMessageContext(ApplicationCommandInteraction interaction, MessageCommand command) Future<MessageContext>
Create a MessageContext from an ApplicationCommandInteraction.
createModalContext(ModalSubmitInteraction interaction) Future<ModalContext>
Create a ModalContext from a ModalSubmitInteraction.
createSelectMenuContext<T>(MessageComponentInteraction interaction, T selected) Future<SelectMenuContext<T>>
Create a SelectMenuContext from a MessageComponentInteraction.
createUserContext(ApplicationCommandInteraction interaction, UserCommand command) Future<UserContext>
Create a UserContext from an ApplicationCommandInteraction.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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