CommandContext class Null safety

Helper class which describes context in which command is executed

Properties

author IMessageAuthor
Author of message
final
channel TextChannel
Channel from where message come from
final
client Nyxx
Reference to client
read-only
commandMatcher String
Substring by which command was matched
final
guild Guild?
Guild in which message was sent
final
hashCode int
The hash code for this object. [...]
read-only, inherited
member Member?
Returns author as guild member
read-only
message Message
Message that was sent
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
shardId int
Shard on which message was sent
read-only

Methods

awaitEmoji(Message msg) Future<IEmoji>
Awaits for emoji under given msg
awaitEmojis(Message msg, Duration duration) Future<Map<IEmoji, int>>
Collects emojis within given duration. Returns empty map if no reaction received [...]
enterTypingState<T>(Future<T> callback()) Future<T>
Starts typing loop and ends when callback resolves.
getArguments() Iterable<String>
Returns list of words separated with space and/or text surrounded by quotes Text: hi this is "example stuff" which 'can be parsed' will return List<String> [hi, this, is, example stuff, which, can be parsed]
getCodeBlocks() Iterable<String>
Returns list of all code blocks in message Language string dart, java will be ignored and not included """ n> eval ```(dart)? await reply(content: 'no to elo'); [...]
getQuotedText() Iterable<String>
Returns list which content of quotes. Text: hi this is "example stuff" which 'can be parsed' will return List<String> [example stuff, can be parsed]
nextMessages(int num) Stream<MessageReceivedEvent>
Gets next num number of any messages sent within one context (same channel). [...]
nextMessagesWhere(bool predicate(MessageReceivedEvent msg), {int limit = 1}) Stream<MessageReceivedEvent>
Gets all context channel messages that satisfies predicate. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
reply(MessageBuilder builder, {bool mention = false, bool reply = false}) Future<Message>
Creates inline reply for message
sendMessage(MessageBuilder builder) Future<Message>
Reply to message. It allows to send regular message, Embed or both. [...]
sendMessageDelayed(Duration duration, MessageBuilder builder) Future<Message>
Replies to message after delay specified with duration [...]
sendMessageTemp(Duration duration, MessageBuilder builder) Future<Message>
Reply to messages, then delete it when duration expires. [...]
toString() String
A string representation of this object. [...]
inherited
waitForTyping(User user, {Duration timeout = const Duration(seconds: 30)}) Future<TypingEvent?>
Waits for first TypingEvent and returns it. If timed out returns null. Can listen to specific user by specifying user

Operators

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