obby-client for TypeScript
    Preparing search index...

    Type Alias ObbyEvent

    ObbyEvent:
        | { names: string[]; type: "capabilities_acknowledged" }
        | { nick: string; type: "registered" }
        | { token: string; type: "isupport_token"; value: string | null }
        | { account: string; type: "logged_in" }
        | { reason: SaslFailure; type: "sasl_failed" }
        | { refused: string; trying: string; type: "nick_in_use" }
        | { change: ModelChange; type: "model_changed" }
        | { type: "link_dead" }
        | { after_ms: number; type: "reconnect_after" }
        | { type: "reconnect_abandoned" }
        | { command: string; type: "command_timed_out" }
        | { type: "allowed_commands_changed" }
        | { nick: string; type: "bots_changed" }
        | { endpoint: string; service: string; token: string; type: "auth_token" }
        | { channel: string; signal: VoiceSignal; type: "voice" }
        | { active: boolean; nick: string; target: string; type: "typing_changed" }
        | { nick: string; online: boolean; type: "presence_changed" }
        | {
            code: string;
            command: string;
            context: string[];
            severity: Severity;
            text: string;
            type: "server_reply";
        }
        | { message: RawMessage; type: "raw_line" }

    Something the host needs to know about.

    Events are drained with [Client::poll_event] rather than delivered through a callback, because a callback needs a different lifetime, threading and re-entrancy contract in every language this engine is bound into.

    Type Declaration

    • { names: string[]; type: "capabilities_acknowledged" }
      • names: string[]

        The capability names, as acknowledged.

      • type: "capabilities_acknowledged"
    • { nick: string; type: "registered" }
      • nick: string

        The nick the server actually gave us, which may differ from the one we asked for.

      • type: "registered"
    • { token: string; type: "isupport_token"; value: string | null }
      • token: string

        The token name, such as CHANMODES.

      • type: "isupport_token"
      • value: string | null

        Its value, absent for a boolean token, present and empty for TOKEN=.

    • { account: string; type: "logged_in" }
      • account: string

        The account the server logged us in as.

      • type: "logged_in"
    • { reason: SaslFailure; type: "sasl_failed" }
    • { refused: string; trying: string; type: "nick_in_use" }
      • refused: string

        The nick that was refused.

      • trying: string

        What is being tried instead.

      • type: "nick_in_use"
    • { change: ModelChange; type: "model_changed" }
      • change: ModelChange

        What changed.

      • type: "model_changed"
    • { type: "link_dead" }
    • { after_ms: number; type: "reconnect_after" }
      • after_ms: number

        How long the host should wait first.

      • type: "reconnect_after"
    • { type: "reconnect_abandoned" }
    • { command: string; type: "command_timed_out" }
      • command: string

        The command that went unanswered.

      • type: "command_timed_out"
    • { type: "allowed_commands_changed" }
    • { nick: string; type: "bots_changed" }
      • nick: string

        The bot the server told us about.

      • type: "bots_changed"
    • { endpoint: string; service: string; token: string; type: "auth_token" }
      • endpoint: string

        Where to present it.

      • service: string

        The service it is for, as the server spells it.

      • token: string

        The token itself.

      • type: "auth_token"
    • { channel: string; signal: VoiceSignal; type: "voice" }
      • channel: string

        The channel the room belongs to.

      • signal: VoiceSignal

        The frame.

      • type: "voice"
    • { active: boolean; nick: string; target: string; type: "typing_changed" }
      • active: boolean

        True when they are composing now.

      • nick: string

        Who.

      • target: string

        The channel or conversation they are composing in.

      • type: "typing_changed"
    • { nick: string; online: boolean; type: "presence_changed" }
      • nick: string

        Who.

      • online: boolean

        True when they are here now.

      • type: "presence_changed"
    • {
          code: string;
          command: string;
          context: string[];
          severity: Severity;
          text: string;
          type: "server_reply";
      }
      • code: string

        The machine-readable code, such as ACCOUNT_REQUIRED_TO_CONNECT.

      • command: string

        The command it concerns, or * when the server did not say.

      • context: string[]

        Any further parameters the server gave, before the description.

      • severity: Severity

        How serious it is.

      • text: string

        The human-readable description.

      • type: "server_reply"
    • { message: RawMessage; type: "raw_line" }
      • message: RawMessage

        The parsed line.

      • type: "raw_line"