BanManager
The ban manager of a chatroom.
Extends
Base<T>
Type parameters
| Type parameter |
|---|
T extends EventSubConnection |
Constructors
new BanManager()
1new BanManager<T>(chatbot: ChatBot<T>, chatroom: ChatRoom<T>): BanManager<T>Creates a new instance of the badge manager.
Parameters
| Parameter | Type | Description |
|---|---|---|
chatbot | ChatBot<T> | The current instance of the chatbot. |
chatroom | ChatRoom<T> | The chatroom which includes this manager. |
Returns
BanManager<T>
Overrides
Base<T>.constructor
Source
twitchfy/packages/chatbot/src/structures/managers/BanManager.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 which includes this manager. | - |
Methods
add()
1add(options: BanOptions): Promise<Ban<T>>Ban a specific user.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | BanOptions | The options required for banning an user. See BanOptions. |
Returns
Promise<Ban<T>>
A class representation of the ban. See Ban.
Source
twitchfy/packages/chatbot/src/structures/managers/BanManager.ts:32
delete()
1delete(userId: string): Promise<void>Deletes the ban of a specific user.
Parameters
| Parameter | Type | Description |
|---|---|---|
userId | string | The id of the user to unban. |
Returns
Promise<void>
Source
twitchfy/packages/chatbot/src/structures/managers/BanManager.ts:41