Conversation<CTX extends Context> class

A conversation handle that provides waiting capabilities with timeout support.

This is the primary interface for conversation functions to wait for user input and control conversation flow with automatic timeout handling.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

extendTimeout(Duration additionalTime) Future<void>
Extends the timeout for the current conversation.
filter(Filter<CTX> filter, {Duration? timeout}) Future<CTX>
Waits for an update that matches a specific filter with timeout.
getRemainingTime() Future<Duration?>
Gets the remaining time before this conversation expires.
halt() Future<void>
Halts the conversation immediately.
isActive() Future<bool>
Checks if this conversation is still active.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCustomTimeout(Duration timeout) Future<void>
Sets a custom timeout for the conversation.
toString() String
A string representation of this object.
inherited
wait([Duration? timeout]) Future<CTX>
Waits for the next update from the user with optional timeout.
waitFor(MiddlewarePredicate<CTX> predicate, {Duration? timeout}) Future<CTX>
Waits for an update that matches a custom predicate with timeout.
waitUntil(bool predicate(CTX ctx), {Duration? timeout, Future<void> otherwise(CTX ctx)?}) Future<CTX>
Waits for an update that satisfies a predicate function with timeout.

Operators

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