Class TextPacket

TextPacket class to create text packets such as for actions or other uses.

Constructors

Properties

Methods

Constructors

  • Creates a new TextPacket class

    Parameters

    • type: number

      The type of the packet.

    • strings: string[]

      An array of strings to include, they will be joined by a newline character. (\n)

    Returns TextPacket

Properties

strings: string[]

An array of strings to include, they will be joined by a newline character. (\n)

type: number

The type of the packet.

Methods

  • Creates a TextPacket class.

    Parameters

    • type: number

      The type of the packet.

    • Rest...strings: string[]

      Strings to include to the packet. They are not arrays, but instead they are arguments for the function.

    Returns TextPacket