Class Client

Hierarchy

Constructors

Properties

config: ClientConfig
host: string
loginState: boolean
reaction: ReactionManager
removeAllListeners: ((event?) => EventEmitter)

Type declaration

    • (event?): EventEmitter
    • Removes all listeners, or those of the specified eventName.

      It is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

      Returns a reference to the EventEmitter, so that calls can be chained.

      Parameters

      • Optional event: string | symbol

      Returns EventEmitter

      Since

      v0.1.26

Methods

  • Type Parameters

    • TEventName extends "follow" | "mention" | "ready" | "noteCreate" | "notification" | "reply" | "renote" | "followed" | "unfollow" | "unreadNotification" | "unreadMention" | "readAllUnreadMentions" | "unreadSpecifiedNote" | "readAllUnreadSpecifiedNotes"

    Parameters

    • eventName: TEventName
    • Rest ...eventArg: ClientEventTypes[TEventName]

    Returns void

  • Type Parameters

    • TEventName extends "follow" | "mention" | "ready" | "noteCreate" | "notification" | "reply" | "renote" | "followed" | "unfollow" | "unreadNotification" | "unreadMention" | "readAllUnreadMentions" | "unreadSpecifiedNote" | "readAllUnreadSpecifiedNotes"

    Parameters

    • eventName: TEventName
    • handler: ((...eventArg) => void)
        • (...eventArg): void
        • Parameters

          • Rest ...eventArg: ClientEventTypes[TEventName]

          Returns void

    Returns void

  • Type Parameters

    • TEventName extends "follow" | "mention" | "ready" | "noteCreate" | "notification" | "reply" | "renote" | "followed" | "unfollow" | "unreadNotification" | "unreadMention" | "readAllUnreadMentions" | "unreadSpecifiedNote" | "readAllUnreadSpecifiedNotes"

    Parameters

    • eventName: TEventName
    • handler: ((...eventArg) => void)
        • (...eventArg): void
        • Parameters

          • Rest ...eventArg: ClientEventTypes[TEventName]

          Returns void

    Returns void

  • Type Parameters

    • TEventName extends "follow" | "mention" | "ready" | "noteCreate" | "notification" | "reply" | "renote" | "followed" | "unfollow" | "unreadNotification" | "unreadMention" | "readAllUnreadMentions" | "unreadSpecifiedNote" | "readAllUnreadSpecifiedNotes"

    Parameters

    • eventName: TEventName
    • handler: ((...eventArt) => void)
        • (...eventArt): void
        • Parameters

          • Rest ...eventArt: ClientEventTypes[TEventName]

          Returns void

    Returns void

Generated using TypeDoc