Appearance
@mastondzn/dank-twitch-irc / BaseClient
Class: abstract
BaseClient
Extends
EventEmitter
<ClientEvents
>
Constructors
new BaseClient(partialConfig)
protected
new BaseClient(partialConfig
?):BaseClient
Parameters
• partialConfig?: ClientConfiguration
Returns
Overrides
EventEmitter<ClientEvents>.constructor
Source
Properties
configuration
readonly
configuration:ExpandedClientConfiguration
Source
joinedChannels
readonly
abstract
joinedChannels:Set
<string
>
Source
state
state:
ClientState
=ClientState.UNCONNECTED
Source
wantedChannels
readonly
abstract
wantedChannels:Set
<string
>
Source
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
connected
get
connected():boolean
Returns
boolean
Source
connecting
get
connecting():boolean
Returns
boolean
Source
ready
get
ready():boolean
Returns
boolean
Source
unconnected
get
unconnected():boolean
Returns
boolean
Source
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
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
emitConnected()
emitConnected():
void
Returns
void
Source
emitConnecting()
emitConnecting():
void
Returns
void
Source
emitError()
emitError(
error
,emitEvenIfClosed
):void
Parameters
• error: Error
• emitEvenIfClosed: boolean
= false
Returns
void
Source
emitMessage()
emitMessage(
message
):void
Parameters
• message: IRCMessage
Returns
void
Source
emitReady()
emitReady():
void
Returns
void
Source
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