Skip to content

MessageManager

Represents the manager for the messages of a chatroom.

Extends

  • Base<T>

Type parameters

Type parameter
T extends EventSubConnection

Constructors

new MessageManager()

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

Creates a new instance of the message manager.

Parameters

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

Returns

MessageManager<T>

Overrides

Base<T>.constructor

Source

twitchfy/packages/chatbot/src/structures/managers/MessageManager.ts:22

Properties

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

Methods

delete()

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

Deletes a message from the chatroom.

Parameters

ParameterTypeDescription
idstringThe id of the message to delete.

Returns

Promise<void>

Source

twitchfy/packages/chatbot/src/structures/managers/MessageManager.ts:32


send()

1
send(message: string): Promise<BaseMessage<T>>

Sends a message to the chatroom.

Parameters

ParameterTypeDescription
messagestringThe message to send.

Returns

Promise<BaseMessage<T>>

The message which was sent.

Source

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