ChatRoom
Represents a Twitch chatroom of a channel.
Extends
Base
<T
>
Type parameters
Type parameter |
---|
T extends EventSubConnection |
Constructors
new ChatRoom()
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:65
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 |
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
The Id of the chatroom. Its id is the same as the broadcaster id.
Returns
string
Source
twitchfy/packages/chatbot/src/structures/ChatRoom.ts:81
Methods
announce()
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:153
send()
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:90
setChatDelay()
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:135
setEmoteOnlyMode()
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:144
setFollowersMode()
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:108
setSlowMode()
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:99
setSubscribersMode()
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:117
setUniqueMessagesMode()
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:126
shoutout()
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.