Class MessageBar

Helper for displaying messages at the top of the screen.

Hierarchy

  • MessageBar

Constructors

Accessors

Methods

Constructors

Accessors

Methods

  • Adds the given formatted message for every player, below any existing non-prompt messages.

    Parameters

    • format: string

      A string containing embed points, for example "Hello {0}" will insert args[0] after the word "Hello ".

    • Rest ...args: MessageEmbed[]

      Optional array of values to embed in the message.

    Returns MessageRow

  • Adds the given formatted message for the given player, below any existing non-prompt messages.

    Parameters

    • player: Player

      Player to add a message for.

    • format: string

      A string containing embed points, for example "Hello {0}" will insert args[0] after the word "Hello ".

    • Rest ...args: MessageEmbed[]

      Optional array of values to embed in the message.

    Returns MessageRow

  • Adds the given formatted message for the given players, below any existing non-prompt messages.

    Parameters

    • players: Iterable<Player>
    • format: string

      A string containing embed points, for example "Hello {0}" will insert args[0] after the word "Hello ".

    • Rest ...args: MessageEmbed[]

      Optional array of values to embed in the message.

    Returns MessageRow

  • Clears all non-prompt messages for all players.

    Returns void

  • Clears all non-prompt messages for the given player.

    Parameters

    • player: Player

      Player to clear messages for.

    Returns void

  • Clears all non-prompt messages for the given players.

    Parameters

    Returns void

  • Removes the given message for all players.

    Parameters

    Returns void

  • Removes the given message for the given player.

    Parameters

    • row: MessageRow

      A previously-added message, as returned by add or set.

    • player: Player

      Player to remove a message for.

    Returns void

  • Removes the given message for the given players.

    Parameters

    Returns void

  • Clears any existing non-prompt messages, then adds the given formatted message for every player.

    Parameters

    • format: string

      A string containing embed points, for example "Hello {0}" will insert args[0] after the word "Hello ".

    • Rest ...args: MessageEmbed[]

      Optional array of values to embed in the message.

    Returns MessageRow

  • Clears any existing non-prompt messages, then adds the given formatted message for the given player.

    Parameters

    • player: Player

      Player to set a message for.

    • format: string

      A string containing embed points, for example "Hello {0}" will insert args[0] after the word "Hello ".

    • Rest ...args: MessageEmbed[]

      Optional array of values to embed in the message.

    Returns MessageRow

  • Clears any existing non-prompt messages, then adds the given formatted message for the given players.

    Parameters

    • players: Iterable<Player>
    • format: string

      A string containing embed points, for example "Hello {0}" will insert args[0] after the word "Hello ".

    • Rest ...args: MessageEmbed[]

      Optional array of values to embed in the message.

    Returns MessageRow

  • Validates a message format string, to make sure it matches the given argument array.

    Parameters

    • format: string

      Message format string.

    • Optional args: MessageEmbed[]

      Array of embedded values to include in the message.

    Returns void

Generated using TypeDoc