Skip to content

WarnsManager

The warns manager of a chatroom.

Extends

  • Base<T>

Type parameters

Type parameter
T extends EventSubConnection

Constructors

new WarnsManager()

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

Creates a new instance of the warns manager.

Parameters

ParameterTypeDescription
chatbotChatBot<T>The current instance of the chatbot.
chatroomChatRoom<T>The chatroom instance.

Returns

WarnsManager<T>

Overrides

Base<T>.constructor

Source

twitchfy/packages/chatbot/src/structures/managers/WarnsManager.ts:23

Properties

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

Methods

create()

1
create(userId: string, reason: string): Promise<Warning<T>>

Creates warn for an user in a specific chatroom.

Parameters

ParameterTypeDescription
userIdstringThe id of the user to warn.
reasonstring-

Returns

Promise<Warning<T>>

Source

twitchfy/packages/chatbot/src/structures/managers/WarnsManager.ts:34