IContext class Null safety

A context in which a command was executed.

Contains data about how and where the command was executed, and provides a simple interfaces for responding to commands.

Implemented types
Implementers

Constructors

IContext()

Properties

channel ITextChannel
The channel in which the context was created.
read-only, inherited
client INyxx
The client that emitted the event triggering this context's creation.
read-only, inherited
command ICommand<IContext>
The command that was executed or is being processed.
read-only, inherited
commands CommandsPlugin
The instance of CommandsPlugin which created this context.
read-only, inherited
guild IGuild?
The guild in which the context was created, or null if created outside of a guild.
read-only, inherited
hashCode int
The hash code for this object.
read-only, inherited
member IMember?
The member that triggered this context's created, or null if created outside of a guild.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
user IUser
The user that triggered this context's creation.
read-only, inherited

Methods

getButtonPress(Iterable<ButtonBuilder> buttons, {bool authorOnly = true, Duration? timeout = const Duration(minutes: 12)}) Future<IButtonInteractionEvent>
Wait for a user to press on a button, then return the result of that interaction.
getConfirmation(MessageBuilder message, {bool authorOnly = true, Duration? timeout = const Duration(minutes: 12), String confirmMessage = 'Yes', String denyMessage = 'No'}) Future<bool>
Send a message prompting a user for confirmation, then return whether the user accepted the choice.
getSelection(MultiselectBuilder selectionMenu, {bool authorOnly = true, Duration? timeout = const Duration(minutes: 12)}) Future<IMultiselectInteractionEvent>
Wait for a user to make a selection from a multiselect menu, then return the result of that interaction.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
respond(MessageBuilder builder, {bool private = false}) Future<IMessage>
Send a response to the command.
toString() String
A string representation of this object.
inherited

Operators

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