MessageChatContext class Null safety
Represents a context in which a ChatCommand was invoked from a text message.
You might also be interested in:
- InteractionChatContext, for chat commands invoked from slash commands.
- Implemented types
Constructors
- MessageChatContext({required String prefix, required IMessage message, required String rawArguments, required ITextChannel channel, required INyxx client, required ChatCommand command, required CommandsPlugin commands, required IGuild? guild, required IMember? member, required IUser user})
- Create a new MessageChatContext.
Properties
- arguments ↔ Iterable
-
The arguments parsed from the user input.
late, final, override
- channel → ITextChannel
-
The channel in which the context was created.
final
- client → INyxx
-
The client that emitted the event triggering this context's creation.
final
- command → ChatCommand
-
The command that was executed or is being processed.
final
- commands → CommandsPlugin
-
The instance of CommandsPlugin which created this context.
final
- guild → IGuild?
-
The guild in which the context was created, or
null
if created outside of a guild.final - 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.final - message → IMessage
-
The message that triggered this command.
final
- prefix → String
-
The prefix that was used to invoke this command.
final
- rawArguments → String
-
The unparsed arguments from the message.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- user → IUser
-
The user that triggered this context's creation.
final
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.
inherited
-
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.
inherited
-
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.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
respond(
MessageBuilder builder, {bool mention = true, bool private = false}) → Future< IMessage> -
Send a response to the command.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited