WireMessage

The message envelope. Retracted messages come back with retracted: true and content: null (a tombstone). Ephemeral messages are not persisted and carry seq: null (they are not returned by history).

  • content
    required

    The message payload, opaque to the platform. Any JSON value, including null for retracted messages.

  • ephemeral
    Type: boolean
    required

    Whether the message is ephemeral (not persisted, no seq).

  • id
    Type: string
    required

    Platform-assigned message id. Unique within the channel.

  • kind
    Type: string
    required

    Content class (text in v1).

  • retracted
    Type: boolean
    required

    Whether the message was retracted after publish.

  • sender
    Type: object · WireSender
    required
    • anon
      Type: boolean
      required

      Whether the sender is anonymous.

    • id
      Type: string
      required

      The sender's user id (or anonymous id).

    • username
      Type: string

      Populated on broadcast channels only (they have no roster to join against).

  • seq
    Type: integer | null
    required

    Per-channel sequence number, or null for ephemeral messages.

  • timestamp
    Type: integer
    required

    Epoch milliseconds.

  • type
    Type: string
    required

    Userland discriminator.

  • mentions
    Type: array object[] · Mention[]
    • userId
      Type: string
      required

      The mentioned user's id, or the platform tokens @everyone / @channel (membership channels, capability-gated, rate-limited).

  • to
    Type: string

    Present when the message was delivered to a single recipient (to:-send).