ChatRoom
Represents a Twitch chatroom of a channel.
Extends
Base<T>
Type parameters
| Type parameter |
|---|
T extends EventSubConnection |
Constructors
new ChatRoom()
1new ChatRoom<T>(chatbot: ChatBot<T>, data: ChatRoomData): ChatRoom<T>Creates a new instance of the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
chatbot | ChatBot<T> | The current instance of the chatbot. |
data | ChatRoomData | The data of the chatroom. |
Returns
ChatRoom<T>
Overrides
Base<T>.constructor
Source
twitchfy/packages/chatbot/src/structures/ChatRoom.ts:71
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
automod | readonly | AutoMod<T> | The automod manager of the chatroom. | - |
bans | readonly | BanManager<T> | The ban manager of the chatroom. | - |
broadcaster | readonly | BaseUser<T> | The broadcaster who owns the chatroom. | - |
channel | readonly | BaseChannel<T> | The channel of the chatroom. | - |
chatbot | readonly | ChatBot<T> | The current instance of the chatbot. | Base.chatbot |
chatters | readonly | ChatterManager<T> | The chatters manager of the chatroom. | - |
messages | readonly | MessageManager<T> | The message manager of the chatroom. | - |
settings | readonly | ChatRoomSettingsManager<T> | The settings manager of the chatroom. | - |
timeouts | readonly | TimeoutManager<T> | The timeout manager of the chatroom. | - |
warns | readonly | WarnsManager<T> | The warns manager of the chatroom. | - |
Accessors
id
1get id(): stringThe Id of the chatroom. Its id is the same as the broadcaster id.
Returns
string
Source
twitchfy/packages/chatbot/src/structures/ChatRoom.ts:88
Methods
announce()
1announce(options: AnnouncementOptions): Promise<void>Sends an announcement to the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | AnnouncementOptions | The options of the announcement. See AnnouncementOptions |
Returns
Promise<void>
The announcement that was sent.
Source
twitchfy/packages/chatbot/src/structures/ChatRoom.ts:160
send()
1send(message: string): Promise<BaseMessage<T>>Sends a message to the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | The message to send. |
Returns
Promise<BaseMessage<T>>
The message that was sent. See BaseMessage
Source
twitchfy/packages/chatbot/src/structures/ChatRoom.ts:97
setChatDelay()
1setChatDelay(duration: null | 2 | 4 | 6): Promise<ChatRoomSettings<T>>Sets the chat delay of the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
duration | null | 2 | 4 | 6 | The duration of the chat delay in seconds. If null, it will disable the chat delay. |
Returns
Promise<ChatRoomSettings<T>>
The updated settings of the chatroom.
Source
twitchfy/packages/chatbot/src/structures/ChatRoom.ts:142
setEmoteOnlyMode()
1setEmoteOnlyMode(enabled: boolean): Promise<ChatRoomSettings<T>>Sets the emote only mode of the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | Whether the emote only mode is enabled. |
Returns
Promise<ChatRoomSettings<T>>
The updated settings of the chatroom.
Source
twitchfy/packages/chatbot/src/structures/ChatRoom.ts:151
setFollowersMode()
1setFollowersMode(duration: null | number): Promise<ChatRoomSettings<T>>Sets the followers mode of the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
duration | null | number | The time, in seconds, the followers must be following the broadcaster to be able to send a message. If null, it will disable the followers mode. |
Returns
Promise<ChatRoomSettings<T>>
The updated settings of the chatroom.
Source
twitchfy/packages/chatbot/src/structures/ChatRoom.ts:115
setSlowMode()
1setSlowMode(duration: null | number): Promise<ChatRoomSettings<T>>Sets the slow mode of the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
duration | null | number | The duration of the slow mode in seconds. If null, it will disable the slow mode. |
Returns
Promise<ChatRoomSettings<T>>
The updated settings of the chatroom.
Source
twitchfy/packages/chatbot/src/structures/ChatRoom.ts:106
setSubscribersMode()
1setSubscribersMode(enabled: boolean): Promise<ChatRoomSettings<T>>Sets the subscribers mode of the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | Whether the subscribers mode is enabled. |
Returns
Promise<ChatRoomSettings<T>>
The updated settings of the chatroom.
Source
twitchfy/packages/chatbot/src/structures/ChatRoom.ts:124
setUniqueMessagesMode()
1setUniqueMessagesMode(enabled: boolean): Promise<ChatRoomSettings<T>>Sets the unique messages mode of the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
enabled | boolean | Whether the unique messages mode is enabled. |
Returns
Promise<ChatRoomSettings<T>>
The updated settings of the chatroom.
Source
twitchfy/packages/chatbot/src/structures/ChatRoom.ts:133
shoutout()
1shoutout(receiverId: string): Promise<void>Sends a shoutout to a user in the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
receiverId | string | The Id of the user to shoutout. |
Returns
Promise<void>
The shoutout that was sent.