twitcheasy-twitch-bottwitch-authtwitch-auth-tmitwitch-chat-clienttwitch-eventsubtwitch-pubsub-clienttwitch-webhooks

ChatClient

An interface to Twitch chat.

Overview

Constructor

new ChatClient(authProvider, options)

Creates a new Twitch chat client.

ParameterTypeRequiredDefaultDescription
authProvider?AuthProvidernone

The AuthProvider instance to use for authentication.

options
ChatClientOptions
{}

Events

onAction((channel, user, message, msg) => { /* ... */ })

Fires when a user sends an action (/me) to a channel.

ParameterTypeDescription
channelstring

The channel the action was sent to.

userstring

The user that send the action.

messagestring

The action text.

msgTwitchPrivateMessage

The full message object containing all message and user information.

onAuthenticationFailure((message) => { /* ... */ })

Fires when authentication fails.

ParameterTypeDescription
messagestring

The message text.

onBan((channel, user) => { /* ... */ })

Fires when a user is permanently banned from a channel.

ParameterTypeDescription
channelstring

The channel the user is banned from.

userstring

The banned user.

onBitsBadgeUpgrade((channel, user, upgradeInfo, msg) => { /* ... */ })

Fires when a user upgrades their bits badge in a channel.

ParameterTypeDescription
channelstring

The channel where the bits badge was upgraded.

userstring

The user that has upgraded their bits badge.

upgradeInfoChatBitsBadgeUpgradeInfonone
msgUserNotice

The full message object containing all message and user information.

onChatClear((channel) => { /* ... */ })

Fires when the chat of a channel is cleared.

ParameterTypeDescription
channelstring

The channel whose chat is cleared.

onCommunityPayForward((channel, user, forwardInfo, msg) => { /* ... */ })

Fires when a user pays forward a subscription that was gifted to them to the community.

ParameterTypeDescription
channelstring

The channel where the gift was forwarded.

userstring

The user that forwarded the gift.

forwardInfoChatCommunityPayForwardInfo

Additional information about the gift.

msgUserNotice

The full message object containing all message and user information.

onCommunitySub((channel, user, subInfo, msg) => { /* ... */ })

Fires when a user gifts random subscriptions to the community of a channel.

Community subs also fire multiple onSubGift events. To prevent alert spam, check Sub gift spam.

ParameterTypeDescription
channelstring

The channel that was subscribed to.

userstring

The gifting user.

subInfoChatCommunitySubInfo

Additional information about the community subscription.

msgUserNotice

The full message object containing all message and user information.

onEmoteOnly((channel, enabled) => { /* ... */ })

Fires when emote-only mode is toggled in a channel.

ParameterTypeDescription
channelstring

The channel where emote-only mode is being toggled.

enabledboolean

Whether emote-only mode is being enabled. If false, it's being disabled.

onFollowersOnly((channel, enabled, delay) => { /* ... */ })

Fires when followers-only mode is toggled in a channel.

ParameterTypeDescription
channelstring

The channel where followers-only mode is being toggled.

enabledboolean

Whether followers-only mode is being enabled. If false, it's being disabled.

delaynumber

The time (in minutes) a user needs to follow the channel to be able to talk. Only available when enabled === true.

onGiftPaidUpgrade((channel, user, subInfo, msg) => { /* ... */ })

Fires when a user upgrades their gift subscription to a paid subscription in a channel.

ParameterTypeDescription
channelstring

The channel where the subscription was upgraded.

userstring

The user that upgraded their subscription.

subInfoChatSubGiftUpgradeInfo

Additional information about the subscription upgrade.

msgUserNotice

The full message object containing all message and user information.

onHost((channel, target, viewers) => { /* ... */ })

Fires when a channel hosts another channel.

ParameterTypeDescription
channelstring

The hosting channel.

targetstring

The channel that is being hosted.

viewersnumber

The number of viewers in the hosting channel.

If you're not logged in as the owner of the channel, this is undefined.

onHosted((channel, byChannel, auto, viewers) => { /* ... */ })

Fires when a channel you're logged in as its owner is being hosted by another channel.

ParameterTypeDescription
channelstring

The channel that is being hosted.

byChannelstring

The hosting channel.

autoboolean

Whether the host was triggered automatically (by Twitch's auto-host functionality).

viewersnumber

The number of viewers in the hosting channel.

onHostsRemaining((channel, numberOfHosts) => { /* ... */ })

Fires when Twitch tells you the number of hosts you have remaining in the next half hour for the channel for which you're logged in as owner after hosting a channel.

ParameterTypeDescription
channelstring

The hosting channel.

numberOfHostsnumber

The number of hosts remaining in the next half hour.

onJoin((channel, user) => { /* ... */ })

Fires when a user joins a channel.

The join/part events are cached by the Twitch chat server and will be batched and sent every 30-60 seconds.

Please note that unless you enabled the requestMembershipEvents option, this will only react to your own joins.

ParameterTypeDescription
channelstring

The channel that is being joined.

userstring

The user that joined.

onMessage((channel, user, message, msg) => { /* ... */ })

Fires when a user sends a message to a channel.

ParameterTypeDescription
channelstring

The channel the message was sent to.

userstring

The user that send the message.

messagestring

The message text.

msgTwitchPrivateMessage

The full message object containing all message and user information.

onMessageFailed((channel, reason) => { /* ... */ })

Fires when sending a message fails.

ParameterTypeDescription
channelstring

The channel that rejected the message.

reasonstring

The reason for the failure, e.g. you're banned (msg_banned)

onMessageRatelimit((channel, message) => { /* ... */ })

Fires when a message you tried to send gets rejected by the ratelimiter.

ParameterTypeDescription
channelstring

The channel that was attempted to send to.

messagestring

The message text.

onMessageRemove((channel, messageId, msg) => { /* ... */ })

Fires when a single message is removed from a channel.

ParameterTypeDescription
channelstring

The channel where the message was removed.

messageIdstring

The ID of the message that was removed.

msgClearMsg

The full message object containing all message and user information.

This is not the message that was removed. The text of the message is available using msg.params.message though.

onNoPermission((channel, message) => { /* ... */ })

Fires when you tried to execute a command you don't have sufficient permission for.

ParameterTypeDescription
channelstring

The channel that a command without sufficient permissions was executed on.

messagestring

The message text.

onPart((channel, user) => { /* ... */ })

Fires when a user leaves ("parts") a channel.

The join/part events are cached by the Twitch chat server and will be batched and sent every 30-60 seconds.

Please note that unless you enabled the requestMembershipEvents option, this will only react to your own parts.

ParameterTypeDescription
channelstring

The channel that is being left.

userstring

The user that left.

onPrimeCommunityGift((channel, user, subInfo, msg) => { /* ... */ })

Fires when a user gifts a Twitch Prime benefit to the channel.

ParameterTypeDescription
channelstring

The channel where the benefit was gifted.

userstring

The user that received the gift.

WARNING: This is a display name and thus will not work as an identifier for the API (login) in some cases.

subInfoChatPrimeCommunityGiftInfo

Additional information about the gift.

msgUserNotice

The full message object containing all message and user information.

onPrimePaidUpgrade((channel, user, subInfo, msg) => { /* ... */ })

Fires when a user upgrades their Prime subscription to a paid subscription in a channel.

ParameterTypeDescription
channelstring

The channel where the subscription was upgraded.

userstring

The user that upgraded their subscription.

subInfoChatSubUpgradeInfo

Additional information about the subscription upgrade.

msgUserNotice

The full message object containing all message and user information.

onPrivmsg((channel, user, message, msg) => { /* ... */ })

Deprecated.

Use onMessage instead.

Fires when a user sends a message to a channel.

ParameterTypeDescription
channelstring

The channel the message was sent to.

userstring

The user that send the message.

messagestring

The message text.

msgTwitchPrivateMessage

The full message object containing all message and user information.

onR9k((channel, enabled) => { /* ... */ })

Fires when R9K mode is toggled in a channel.

ParameterTypeDescription
channelstring

The channel where R9K mode is being toggled.

enabledboolean

Whether R9K mode is being enabled. If false, it's being disabled.

onRaid((channel, user, raidInfo, msg) => { /* ... */ })

Fires when a user raids a channel.

ParameterTypeDescription
channelstring

The channel that was raided.

userstring

The user that has raided the channel.

raidInfoChatRaidInfo

Additional information about the raid.

msgUserNotice

The full message object containing all message and user information.

onRaidCancel((channel, msg) => { /* ... */ })

Fires when a user cancels a raid.

ParameterTypeDescription
channelstring

The channel where the raid was cancelled.

msgUserNotice

The full message object containing all message and user information.

onResub((channel, user, subInfo, msg) => { /* ... */ })

Fires when a user resubscribes to a channel.

ParameterTypeDescription
channelstring

The channel that was resubscribed to.

userstring

The resubscribing user.

subInfoChatSubInfo

Additional information about the resubscription.

msgUserNotice

The full message object containing all message and user information.

onRewardGift((channel, user, rewardGiftInfo, msg) => { /* ... */ })

Fires when a user gifts rewards during a special event.

ParameterTypeDescription
channelstring

The channel where the rewards were gifted.

userstring

The user that gifted the rewards.

rewardGiftInfoChatRewardGiftInfo

Additional information about the reward gift.

msgUserNotice

The full message object containing all message and user information.

onRitual((channel, user, ritualInfo, msg) => { /* ... */ })

Fires when a user performs a "ritual" in a channel.

ParameterTypeDescription
channelstring

The channel where the ritual was performed.

userstring

The user that has performed the ritual.

ritualInfoChatRitualInfo

Additional information about the ritual.

msgUserNotice

The full message object containing all message and user information.

onSlow((channel, enabled, delay) => { /* ... */ })

Fires when slow mode is toggled in a channel.

ParameterTypeDescription
channelstring

The channel where slow mode is being toggled.

enabledboolean

Whether slow mode is being enabled. If false, it's being disabled.

delaynumber

The time (in seconds) a user has to wait between sending messages. Only set when enabling slow mode.

onStandardPayForward((channel, user, forwardInfo, msg) => { /* ... */ })

Fires when a user pays forward a subscription that was gifted to them to a specific user.

ParameterTypeDescription
channelstring

The channel where the gift was forwarded.

userstring

The user that forwarded the gift.

forwardInfoChatStandardPayForwardInfo

Additional information about the gift.

msgUserNotice

The full message object containing all message and user information.

onSub((channel, user, subInfo, msg) => { /* ... */ })

Fires when a user subscribes to a channel.

ParameterTypeDescription
channelstring

The channel that was subscribed to.

userstring

The subscribing user.

subInfoChatSubInfo

Additional information about the subscription.

msgUserNotice

The full message object containing all message and user information.

onSubExtend((channel, user, subInfo, msg) => { /* ... */ })

Fires when a user extends their subscription using a Sub Token.

ParameterTypeDescription
channelstring

The channel where the subscription was extended.

userstring

The user that extended their subscription.

subInfoChatSubExtendInfo

Additional information about the subscription extension.

msgUserNotice

The full message object containing all message and user information.

onSubGift((channel, user, subInfo, msg) => { /* ... */ })

Fires when a user gifts a subscription to a channel to another user.

Community subs also fire multiple onSubGift events. To prevent alert spam, check Sub gift spam.

ParameterTypeDescription
channelstring

The channel that was subscribed to.

userstring

The user that the subscription was gifted to. The gifting user is defined in subInfo.gifter.

subInfoChatSubGiftInfo

Additional information about the subscription.

msgUserNotice

The full message object containing all message and user information.

onSubsOnly((channel, enabled) => { /* ... */ })

Fires when sub only mode is toggled in a channel.

ParameterTypeDescription
channelstring

The channel where sub only mode is being toggled.

enabledboolean

Whether sub only mode is being enabled. If false, it's being disabled.

onTimeout((channel, user, duration) => { /* ... */ })

Fires when a user is timed out from a channel.

ParameterTypeDescription
channelstring

The channel the user is timed out from.

userstring

The timed out user.

durationnumber

The duration of the timeout, in seconds.

onUnhost((channel) => { /* ... */ })

Fires when host mode is disabled in a channel.

ParameterTypeDescription
channelstring

The channel where host mode is being disabled.

onWhisper((user, message, msg) => { /* ... */ })

Fires when receiving a whisper from another user.

ParameterTypeDescription
userstring

The user that sent the whisper.

messagestring

The message text.

msgWhisper

The full message object containing all message and user information.

Properties

onAnyMessage

Type: (handler: (msg: Message) => void) => Listener

onConnect

Type: (handler: () => void) => Listener

onCtcp

Type: (handler: (target: string, user: string, command: string, params: string, msg: PrivateMessage) => void) => Listener

onCtcpReply

Type: (handler: (target: string, user: string, command: string, params: string, msg: Notice) => void) => Listener

onDisconnect

Type: (handler: (manually: boolean, reason: Error) => void) => Listener

onNickChange

Type: (handler: (oldNick: ?string, newNick: string, msg: NickChange) => void) => Listener

onNotice

Type: (handler: (target: string, user: string, message: string, msg: Notice) => void) => Listener

onRegister

Type: (handler: () => void) => Listener

currentNick

Type: string

isConnected

Type: boolean

isConnecting

Type: boolean

isRegistered

Type: boolean

port

Type: number

serverProperties

Type: ServerProperties

Methods

anonymous(options)

static

Creates a new anonymous Twitch chat client.

ParameterTypeRequiredDefaultDescription
options
ChatClientOptions
{}
Return type: ChatClient

forTwitchClient(authProvider, options)

static
Deprecated.

Use the ChatClient constructor instead.

Creates a new Twitch chat client with the user info from the AuthProvider instance.

ParameterTypeRequiredDefaultDescription
authProviderAuthProvidernone

The AuthProvider instance to use for authentication.

options
ChatClientOptions
{}
Return type: ChatClient

action(channel, message)

async

Sends an action message (/me) to a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to send the message to.

messagestringnone

The message to send.

Return type: void

addCapability(cap)

ParameterTypeRequiredDefaultDescription
capCapabilitynonenone
Return type: void

addListener<Args>(event, listener)

ParameterTypeRequiredDefaultDescription
eventEventBinder<Args>nonenone
listenerEventHandler<Args>nonenone
Return type: Listener

addVip(channel, user)

async

Gives a user VIP status in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to give the user VIP status in.

userstringnone

The user to give VIP status.

Return type: void

addVIP(channel, user)

async
Deprecated.

Use addVip instead.

ParameterTypeRequiredDefaultDescription
channelstringnonenone
userstringnonenone
Return type: void

ban(channel, user, reason)

async

Bans a user from a channel.

ParameterTypeRequiredDefaultDescription
channel?stringnone

The channel to ban the user from. Defaults to the channel of the connected user.

userstringnone

The user to ban from the channel.

reasonstring""

The reason for the ban.

Return type: void

changeColor(color)

async

Changes your username color.

ParameterTypeRequiredDefaultDescription
colorstringnone

The hexadecimal code (prefixed with #) or color name to use for your username.

Please note that only Twitch Turbo or Prime users can use hexadecimal codes for arbitrary colors.

If you have neither of those, you can only choose from the following color names:

Blue, BlueViolet, CadetBlue, Chocolate, Coral, DodgerBlue, Firebrick, GoldenRod, Green, HotPink, OrangeRed, Red, SeaGreen, SpringGreen, YellowGreen

Return type: void

clear(channel)

async

Clears all messages in a channel.

ParameterTypeRequiredDefaultDescription
channelstringthis._credentials.nick

The channel to ban the user from. Defaults to the channel of the connected user.

Return type: void

connect()

async
Return type: void

createMessage<T>(type, params, tags)

ParameterTypeRequiredDefaultDescription
typeMessageConstructor<T>nonenone
paramsPartial<MessageParamValues<T>>nonenone
tagsRecord<string, string>nonenone
Return type: T

deleteMessage(channel, message)

async

Deletes a message from a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to delete the message from.

messagestring | TwitchPrivateMessagenone

The message (as message ID or message object) to delete.

Return type: void

disableEmoteOnly(channel)

async

Disables emote-only mode in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to disable emote-only mode in.

Return type: void

disableFollowersOnly(channel)

async

Disables followers-only mode in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to disable followers-only mode in.

Return type: void

disableR9k(channel)

async

Disables r9k mode in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to disable r9k mode in.

Return type: void

disableSlow(channel)

async

Disables slow mode in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to disable slow mode in.

Return type: void

disableSubsOnly(channel)

async

Disables subscribers-only mode in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to disable subscribers-only mode in.

Return type: void

enableEmoteOnly(channel)

async

Enables emote-only mode in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to enable emote-only mode in.

Return type: void

enableFollowersOnly(channel, minFollowTime)

async

Enables followers-only mode in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to enable followers-only mode in.

minFollowTimenumber0

The time (in minutes) a user needs to be following before being able to send messages.

Return type: void

enableR9k(channel)

async

Enables r9k mode in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to enable r9k mode in.

Return type: void

enableSlow(channel, delayBetweenMessages)

async

Enables slow mode in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to enable slow mode in.

delayBetweenMessagesnumber30

The time (in seconds) a user needs to wait between messages.

Return type: void

enableSubsOnly(channel)

async

Enables subscribers-only mode in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to enable subscribers-only mode in.

Return type: void

getCommandClass(command)

ParameterTypeRequiredDefaultDescription
commandstringnonenone
Return type: ?MessageConstructor

getMods(channel)

async

Retrieves a list of moderators in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to retrieve the moderators of.

Return type: Array<string>

getVips(channel)

async

Retrieves a list of VIPs in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to retrieve the VIPs of.

Return type: Array<string>

getVIPs(channel)

async
Deprecated.

Use getVips instead.

ParameterTypeRequiredDefaultDescription
channelstringnonenone
Return type: Array<string>

host(channel, target)

async

Hosts a channel on another channel.

ParameterTypeRequiredDefaultDescription
channel?stringnone

The host source, i.e. the channel that is hosting. Defaults to the channel of the connected user.

targetstringnone

The host target, i.e. the channel that is being hosted.

Return type: void

join(channel)

async

Joins a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to join.

Return type: void

knowsCommand(command)

ParameterTypeRequiredDefaultDescription
commandstringnonenone
Return type: boolean

mod(channel, user)

async

Gives a user moderator rights in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to give the user moderator rights in.

userstringnone

The user to give moderator rights.

Return type: void

on<Args>(event, listener)

ParameterTypeRequiredDefaultDescription
eventEventBinder<Args>nonenone
listenerEventHandler<Args>nonenone
Return type: Listener

onNamedMessage<T>(commandName, handler, handlerName)

ParameterTypeRequiredDefaultDescription
commandNamestringnonenone
handlerEventHandler<T>nonenone
handlerNamestringnonenone
Return type: string

onTypedMessage<T>(type, handler, handlerName)

ParameterTypeRequiredDefaultDescription
typeMessageConstructor<T>nonenone
handlerEventHandler<T>nonenone
handlerNamestringnonenone
Return type: string

part(channel)

Leaves a channel ("part" in IRC terms).

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to leave.

Return type: void

pingCheck()

Return type: void

purge(channel, user, reason)

async

Removes all messages of a user from a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to purge the user's messages from.

userstringnone

The user to purge.

reasonstring""

The reason for the purge.

Return type: void

quit()

async

Disconnects from the chat server.

Return type: void

raid(channel, target)

async

Starts a raid on a channel.

ParameterTypeRequiredDefaultDescription
channel?stringnone

The channel to start the raid in. Defaults to the channel of the connected user.

targetstringnone

The channel to raid.

Return type: void

receiveLine(line)

ParameterTypeRequiredDefaultDescription
linestringnonenone
Return type: void

reconnect(message)

async
ParameterTypeRequiredDefaultDescription
messagestringnonenone
Return type: void

registerCapability(cap)

async
ParameterTypeRequiredDefaultDescription
capCapabilitynonenone
Return type: Array<ServerCapability> | Error

registerEvent<T>()

Return type: EventBinder<T>

registerMessageType(cls)

ParameterTypeRequiredDefaultDescription
clsMessageConstructornonenone
Return type: void

removeListener(id)

ParameterTypeRequiredDefaultDescription
idListenernonenone
Return type: void

removeListener(event, listener)

ParameterTypeRequiredDefaultDescription
eventFunctionnonenone
listenerFunctionnonenone
Return type: void

removeMessageListener(handlerName)

ParameterTypeRequiredDefaultDescription
handlerNamestringnonenone
Return type: void

removeVip(channel, user)

async

Takes VIP status from a user in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to remove the user's VIP status in.

userstringnone

The user to take VIP status from.

Return type: void

removeVIP(channel, user)

async
Deprecated.

Use removeVip instead.

ParameterTypeRequiredDefaultDescription
channelstringnonenone
userstringnonenone
Return type: void

runCommercial(channel, duration)

async

Runs a commercial break on a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to run the commercial break on.

duration
CommercialLength

The possible lengths of a channel commercial.

Aliased type: 30 | 60 | 90 | 120 | 150 | 180

none

The duration of the commercial break.

Return type: void

say(channel, message, attributes)

async

Sends a message to a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to send the message to.

messagestringnone

The message to send.

attributesChatSayMessageAttributes{}

The attributes to add to the message.

Return type: void

send(message)

ParameterTypeRequiredDefaultDescription
messageMessagenonenone
Return type: void

sendCtcp(target, type, message)

ParameterTypeRequiredDefaultDescription
targetstringnonenone
typestringnonenone
messagestringnonenone
Return type: void

sendMessage<T>(type, params, tags)

ParameterTypeRequiredDefaultDescription
typeMessageConstructor<T>nonenone
paramsPartial<MessageParamValues<T>>nonenone
tagsRecord<string, string>nonenone
Return type: void

sendMessageAndCaptureReply<T>(type, params)

async
ParameterTypeRequiredDefaultDescription
typeMessageConstructor<T>nonenone
paramsPartial<MessageParamValues<T>>nonenone
Return type: Array<Message>

sendRaw(line)

ParameterTypeRequiredDefaultDescription
linestringnonenone
Return type: void

timeout(channel, user, duration, reason)

async

Times out a user in a channel and removes all their messages.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to time out the user in.

userstringnone

The user to time out.

durationnumber60

The time (in seconds) until the user can send messages again. Defaults to 1 minute.

reasonstring""
Return type: void

unhost(channel)

async

Ends any host on a channel.

This only works when in the channel that was hosted in order to provide feedback about success of the command.

If you don't need this feedback, consider using ChatClient#unhostOutside instead.

ParameterTypeRequiredDefaultDescription
channelstringthis._credentials.nick

The channel to end the host on. Defaults to the channel of the connected user.

Return type: void

unhostOutside(channel)

async

Ends any host on a channel.

This works even when not in the channel that was hosted, but provides no feedback about success of the command.

If you need feedback about success, use ChatClient#unhost (but make sure you're in the channel you are hosting).

ParameterTypeRequiredDefaultDescription
channelstringthis._credentials.nick

The channel to end the host on. Defaults to the channel of the connected user.

Return type: void

unmod(channel, user)

async

Takes moderator rights from a user in a channel.

ParameterTypeRequiredDefaultDescription
channelstringnone

The channel to remove the user's moderator rights in.

userstringnone

The user to take moderator rights from.

Return type: void

unraid(channel)

async

Ends a raid on a channel.

ParameterTypeRequiredDefaultDescription
channel?stringnone

The channel to end the raid in. Defaults to the channel of the connected user.

Return type: void

waitForRegistration()

async
Deprecated.

Use the onRegister event instead. To join channels after connecting, use the channels option.

Waits for authentication (or "registration" in IRC terms) to finish.

Return type: void

whisper(user, message)

async

Sends a whisper message to another user.

ParameterTypeRequiredDefaultDescription
userstringnone

The user to send the message to.

messagestringnone

The message to send.

Return type: void