ChannelManager
Represents the chatbot channel manager used to join to channels.
Extends
Base
<T
>
Type parameters
Type parameter |
---|
T extends EventSubConnection |
Constructors
new ChannelManager()
Creates a new instance of the channel manager.
Parameters
Parameter | Type | Description |
---|---|---|
chatbot | ChatBot <T > | The current instance of the chatbot. |
Returns
Overrides
Base<T>.constructor
Source
twitchfy/packages/chatbot/src/structures/managers/ChannelManager.ts:19
Properties
Property | Modifier | Type | Description | Inherited from |
---|---|---|---|---|
chatbot | readonly | ChatBot <T > | The current instance of the chatbot. | Base.chatbot |
Methods
fetch()
Fetches a channel by id.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | The 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()
Join a channel and listen to messages.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | The 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()
Leave a channel. You will no longer listen to messages and the other events you’ve subscribed.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | The id of the channel to leave. |
Returns
Promise
<void
>
Source
twitchfy/packages/chatbot/src/structures/managers/ChannelManager.ts:70