MessageCollector<T extends PartialMessage<PartialChannel>> class

The MessageCollector class is part of the Mineral framework and is used to collect messages that match certain criteria. It can be used to implement functionality like message polls or message surveys.

Constructors

MessageCollector({required bool filter(T message), int? max, Duration? time})

Properties

controller StreamController
finalinherited
event Type
no setterinherited
filter bool Function(T message)
final
hashCode int
The hash code for this object.
no setterinherited
max int?
Represents the maximum number of messages to collect.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
time Duration?
Represents the maximum amount of time to collect messages for.
final

Methods

collect() Future<Map<Snowflake, T>>
It starts listening to the MessageCreateEvent and collects messages that match the filter criteria.
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