Saxonberg Server API
    Preparing search index...
    Index

    Methods

    • Create an EventSub websocket subscription of an arbitrary type (the no-chat-assumption seam). token is a user token bearing the required scope (the reader's user:read:chat for channel.chat.message).

      Parameters

      • opts: {
            condition: Record<string, string>;
            token: string;
            type: string;
            version: string;
        }

      Returns Promise<{ id: string }>

    • Resolve a Twitch login to its stable broadcaster id (Helix /users). Used so a player can tune in by handle. Returns null for an unknown login (or a non-OK response).

      Parameters

      • login: string
      • token: string

      Returns Promise<{ id: string; login: string } | null>

    • Send a chat message to a broadcaster's channel as senderId, using senderId's user:write:chat token. Stateless — no socket.

      Parameters

      • opts: { broadcasterId: string; senderId: string; text: string; token: string }

      Returns Promise<{ error?: string; messageId?: string; ok: boolean }>