The message collector for a channel.

Example

new MessageCollector(channel);

Hierarchy

Constructors

Properties

channel: ChatChannel
client: Client
collected: Collection<string, Message>

The collected data.

createdAt: Date

The date the collector was created.

endedAt?: Date

The date the collector was ended.

Accessors

  • get createdTimestamp(): number
  • The timestamp the collector was created.

    Returns number

  • get endedTimestamp(): undefined | number
  • The timestamp the collector was ended.

    Returns undefined | number

  • get isEnded(): boolean
  • Whether the collector has ended.

    Returns boolean

  • get uptime(): number
  • The time the collector has been running.

    Returns number

Methods

  • Collect a item.

    Returns

    The collected item.

    Example

    collector.collect(item);
    

    Parameters

    • item: Message

      The item to collect.

    Returns Promise<undefined | Message>

  • Dispose a collected item.

    Returns

    The disposed item.

    Example

    collector.dispose('abc');
    

    Parameters

    • itemId: string

      The ID of the item to dispose.

    Returns undefined | Message

  • End the collector.

    Example

    collector.end();
    

    Returns void