Skip to content

BanManager

The ban manager of a chatroom.

Extends

  • Base<T>

Type parameters

Type parameter
T extends EventSubConnection

Constructors

new BanManager()

1
new BanManager<T>(chatbot: ChatBot<T>, chatroom: ChatRoom<T>): BanManager<T>

Creates a new instance of the badge manager.

Parameters

ParameterTypeDescription
chatbotChatBot<T>The current instance of the chatbot.
chatroomChatRoom<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

PropertyModifierTypeDescriptionInherited from
chatbotreadonlyChatBot<T>The current instance of the chatbot.Base.chatbot
chatroomreadonlyChatRoom<T>The chatroom which includes this manager.-

Methods

add()

1
add(options: BanOptions): Promise<Ban<T>>

Ban a specific user.

Parameters

ParameterTypeDescription
optionsBanOptionsThe 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()

1
delete(userId: string): Promise<void>

Deletes the ban of a specific user.

Parameters

ParameterTypeDescription
userIdstringThe id of the user to unban.

Returns

Promise<void>

Source

twitchfy/packages/chatbot/src/structures/managers/BanManager.ts:41