flackle-selfbot - v0.2.0
    Preparing search index...

    Class Gateway

    Flackle's realtime gateway.

    The wire format is newline-delimited JSON ({ "type": "...", "payload": {...} }). A connection is authenticated with a short-lived ticket from /api/ws/url.

    Hierarchy (View Summary)

    Index
    • get subscribedServers(): readonly string[]

      Returns readonly string[]

    • Connects and resolves once the gateway's hello frame arrives.

      Returns Promise<void>

    • Sends a raw gateway packet. Throws if the socket is not open.

      Parameters

      • type: string
      • payload: Record<string, unknown> = {}

      Returns void

    • Parameters

      • type: string
      • payload: Record<string, unknown> = {}

      Returns boolean

    • Subscribes to guild events. The subscription is replayed on reconnect.

      Parameters

      • serverIds: string[]

      Returns void

    • Parameters

      • serverId: string

      Returns void

    • Marks the account as idle (true) or active (false).

      Parameters

      • idle: boolean

      Returns void

    • Parameters

      • code: number = 1000
      • reason: string = "client disconnect"

      Returns Promise<void>

    origin: string
    userAgent: string
    socket: WebSocket | null = null
    isConnected: boolean = false
    sessionId?: string
    ping: number = -1
    user?: SelfUser