TimeoutManager
The timeout manager of a chatroom.
Extends
Base<T>
Type parameters
| Type parameter |
|---|
T extends EventSubConnection |
Constructors
new TimeoutManager()
1new TimeoutManager<T>(chatbot: ChatBot<T>, chatroom: ChatRoom<T>): TimeoutManager<T>Creates a new instance of the timeout manager.
Parameters
| Parameter | Type | Description |
|---|---|---|
chatbot | ChatBot<T> | The current instance of the chatbot. |
chatroom | ChatRoom<T> | The chatroom instance. |
Returns
Overrides
Base<T>.constructor
Source
twitchfy/packages/chatbot/src/structures/managers/TimeoutManager.ts:22
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
chatbot | readonly | ChatBot<T> | The current instance of the chatbot. | Base.chatbot |
chatroom | readonly | ChatRoom<T> | The chatroom instance. | - |
Methods
add()
1add(options: TimeoutOptions): Promise<void>Timeout a specific user within the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | TimeoutOptions | The options required for send an user into a timeout. See TimeoutOptions. |
Returns
Promise<void>
Source
twitchfy/packages/chatbot/src/structures/managers/TimeoutManager.ts:32
delete()
1delete(userId: string): Promise<void>Deletes the timeout of a specific user within the chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
userId | string | The id of the user to remove from the timeout. |
Returns
Promise<void>
Source
twitchfy/packages/chatbot/src/structures/managers/TimeoutManager.ts:41