Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • EventEmitter
    • PageUpdater

Index

Constructors

  • Create a PageUpdater to await a response from a user, and set the embedArray to the provided number.

    const pageUpdater = new PageUpdater(pageEmbedBuilder, message.author, builder.getEmbeds());
    pageUpdater.awaitPageUpdate()
    .on('cancel', (collector) => collector.stop())
    .on('page', (page) => builder.updatePage(page));

    Parameters

    • pageEmbedBuilder: PageEmbedBuilder

      The PageEmbedBuilder to grab info from.

    • user: User

      The user this will be accepting messages from/

    • Optional options: PageUpdateOptions

      Options such as messages, time, cancel.

    Returns PageUpdater

Events

  • cancel(collector: MessageCollector, content: string, message: string): void
  • Emitted when it has been canceled or it has ended.

    Parameters

    • collector: MessageCollector

      The message collector.

    • content: string

      The content that contained the cancel keyword.

    • message: string

      The message that has been formatted to be sent to the user.

    Returns void

  • invalid(collector: MessageCollector, content: string, message: string): void
  • Emitted when it has received an invalid number or page.

    Parameters

    • collector: MessageCollector

      The message collector.

    • content: string

      The content that contained the page number.

    • message: string

      The message that has been formatted to be sent to the user.

    Returns void

  • page(page: number, content: string, collector: MessageCollector, message: string): void
  • Emitted when it has received a valid number.

    Parameters

    • page: number

      The page number received.

    • content: string

      The content that contained the page number.

    • collector: MessageCollector

      The message collector.

    • message: string

      The message that has been formatted to be sent to the user.

    Returns void

Properties

channel: TextChannel | DMChannel
embedArray: EmbedBuilder[]
options: PageUpdateOptions = ...
user: User

Methods

Generated using TypeDoc