Skip to content

@mastondzn/dank-twitch-irc / BaseClient

Class: abstract BaseClient

Extends

Constructors

new BaseClient(partialConfig)

protected new BaseClient(partialConfig?): BaseClient

Parameters

partialConfig?: ClientConfiguration

Returns

BaseClient

Overrides

EventEmitter<ClientEvents>.constructor

Source

src/client/base-client.ts:38

Properties

configuration

readonly configuration: ExpandedClientConfiguration

Source

src/client/base-client.ts:32


joinedChannels

readonly abstract joinedChannels: Set<string>

Source

src/client/base-client.ts:34


state

state: ClientState = ClientState.UNCONNECTED

Source

src/client/base-client.ts:36


wantedChannels

readonly abstract wantedChannels: Set<string>

Source

src/client/base-client.ts:33


prefixed

static prefixed: string | boolean

Inherited from

EventEmitter.prefixed

Source

node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.d.ts:9

Accessors

closed

get closed(): boolean

Returns

boolean

Source

src/client/base-client.ts:28


connected

get connected(): boolean

Returns

boolean

Source

src/client/base-client.ts:20


connecting

get connecting(): boolean

Returns

boolean

Source

src/client/base-client.ts:16


ready

get ready(): boolean

Returns

boolean

Source

src/client/base-client.ts:24


unconnected

get unconnected(): boolean

Returns

boolean

Source

src/client/base-client.ts:12

Methods

addListener()

addListener<T>(event, fn, context?): this

Type parameters

T extends string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents

Parameters

event: T

fn

context?: any

Returns

this

Inherited from

EventEmitter.addListener

Source

node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.d.ts:45


advanceState()

advanceState(newState): boolean

Parameters

newState: ClientState

Returns

boolean

Source

src/client/base-client.ts:80


emit()

emit<T>(event, ...args): boolean

Calls each of the listeners registered for a given event.

Type parameters

T extends string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents

Parameters

event: T

• ...args: ArgumentMap<ClientEvents>[Extract<T, string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents>]

Returns

boolean

Inherited from

EventEmitter.emit

Source

node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.d.ts:32


emitClosed()

emitClosed(error?): void

Parameters

error?: Error

Returns

void

Source

src/client/base-client.ts:74


emitConnected()

emitConnected(): void

Returns

void

Source

src/client/base-client.ts:62


emitConnecting()

emitConnecting(): void

Returns

void

Source

src/client/base-client.ts:56


emitError()

emitError(error, emitEvenIfClosed): void

Parameters

error: Error

emitEvenIfClosed: boolean= false

Returns

void

Source

src/client/base-client.ts:43


emitMessage()

emitMessage(message): void

Parameters

message: IRCMessage

Returns

void

Source

src/client/base-client.ts:51


emitReady()

emitReady(): void

Returns

void

Source

src/client/base-client.ts:68


eventNames()

eventNames(): (string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents)[]

Return an array listing the events for which the emitter has registered listeners.

Returns

(string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents)[]

Inherited from

EventEmitter.eventNames

Source

node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.d.ts:15


listenerCount()

listenerCount(event): number

Return the number of listeners listening to a given event.

Parameters

event: string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents

Returns

number

Inherited from

EventEmitter.listenerCount

Source

node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.d.ts:27


listeners()

listeners<T>(event): (...args) => void[]

Return the listeners registered for a given event.

Type parameters

T extends string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents

Parameters

event: T

Returns

(...args) => void[]

Inherited from

EventEmitter.listeners

Source

node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.d.ts:20


off()

off<T>(event, fn?, context?, once?): this

Type parameters

T extends string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents

Parameters

event: T

fn?

context?: any

once?: boolean

Returns

this

Inherited from

EventEmitter.off

Source

node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.d.ts:69


on()

on<T>(event, fn, context?): this

Add a listener for a given event.

Type parameters

T extends string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents

Parameters

event: T

fn

context?: any

Returns

this

Inherited from

EventEmitter.on

Source

node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.d.ts:40


once()

once<T>(event, fn, context?): this

Add a one-time listener for a given event.

Type parameters

T extends string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents

Parameters

event: T

fn

context?: any

Returns

this

Inherited from

EventEmitter.once

Source

node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.d.ts:54


removeAllListeners()

removeAllListeners(event?): this

Remove all listeners, or those of the specified event.

Parameters

event?: string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents

Returns

this

Inherited from

EventEmitter.removeAllListeners

Source

node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.d.ts:79


removeListener()

removeListener<T>(event, fn?, context?, once?): this

Remove the listeners of a given event.

Type parameters

T extends string & Record<never, never> | "CLEARCHAT" | "CLEARMSG" | "GLOBALUSERSTATE" | "HOSTTARGET" | "NOTICE" | "PRIVMSG" | "ROOMSTATE" | "USERNOTICE" | "USERSTATE" | "WHISPER" | "JOIN" | "PART" | "RECONNECT" | "PING" | "PONG" | "CAP" | keyof SpecificClientEvents

Parameters

event: T

fn?

context?: any

once?: boolean

Returns

this

Inherited from

EventEmitter.removeListener

Source

node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.d.ts:63