Skip to content

ChannelManager

Represents the chatbot channel manager used to join to channels.

Extends

  • Base<T>

Type parameters

Type parameter
T extends EventSubConnection

Constructors

new ChannelManager()

1
new ChannelManager<T>(chatbot: ChatBot<T>): ChannelManager<T>

Creates a new instance of the channel manager.

Parameters

ParameterTypeDescription
chatbotChatBot<T>The current instance of the chatbot.

Returns

ChannelManager<T>

Overrides

Base<T>.constructor

Source

twitchfy/packages/chatbot/src/structures/managers/ChannelManager.ts:19

Properties

PropertyModifierTypeDescriptionInherited from
chatbotreadonlyChatBot<T>The current instance of the chatbot.Base.chatbot

Methods

fetch()

1
fetch(id: string): Promise<Channel<T>>

Fetches a channel by id.

Parameters

ParameterTypeDescription
idstringThe id of the channel to fetch.

Returns

Promise<Channel<T>>

A class representation of the channel. See Channel.

Source

twitchfy/packages/chatbot/src/structures/managers/ChannelManager.ts:104


join()

1
join(id: string, events?: (
2
| "ChannelChatClear"
3
| "ChannelFollow"
4
| "ChannelUpdate"
5
| "StreamOnline"
6
| "ChannelChatMessage")[]): Promise<ChannelProfile<T>>

Join a channel and listen to messages.

Parameters

ParameterTypeDescription
idstringThe id of the channel to join.
events?( | "ChannelChatClear" | "ChannelFollow" | "ChannelUpdate" | "StreamOnline" | "ChannelChatMessage")[]The EventSub events you will listen to. See ChannelEvents.

Returns

Promise<ChannelProfile<T>>

A class representation of the channel profile which contains the events you are subscribed with. See ChannelProfile.

Source

twitchfy/packages/chatbot/src/structures/managers/ChannelManager.ts:29


leave()

1
leave(id: string): Promise<void>

Leave a channel. You will no longer listen to messages and the other events you’ve subscribed.

Parameters

ParameterTypeDescription
idstringThe id of the channel to leave.

Returns

Promise<void>

Source

twitchfy/packages/chatbot/src/structures/managers/ChannelManager.ts:70