WarnsManager
The warns manager of a chatroom.
Extends
Base<T>
Type parameters
| Type parameter |
|---|
T extends EventSubConnection |
Constructors
new WarnsManager()
1new WarnsManager<T>(chatbot: ChatBot<T>, chatroom: ChatRoom<T>): WarnsManager<T>Creates a new instance of the warns manager.
Parameters
| Parameter | Type | Description |
|---|---|---|
chatbot | ChatBot<T> | The current instance of the chatbot. |
chatroom | ChatRoom<T> | The chatroom instance. |
Returns
WarnsManager<T>
Overrides
Base<T>.constructor
Source
twitchfy/packages/chatbot/src/structures/managers/WarnsManager.ts:23
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
create()
1create(userId: string, reason: string): Promise<Warning<T>>Creates warn for an user in a specific chatroom.
Parameters
| Parameter | Type | Description |
|---|---|---|
userId | string | The id of the user to warn. |
reason | string | - |
Returns
Promise<Warning<T>>
Source
twitchfy/packages/chatbot/src/structures/managers/WarnsManager.ts:34