Skip to content

BaseMessage

The base class for a message.

Extends

  • Base<T>

Extended by

Type parameters

Type parameter
T extends EventSubConnection

Constructors

new BaseMessage()

1
new BaseMessage<T>(chatbot: ChatBot<T>, data: BaseMessageData): BaseMessage<T>

Creates a new instance of the base message.

Parameters

ParameterTypeDescription
chatbotChatBot<T>The current instance of the chatbot.
dataBaseMessageDataThe base data of the message.

Returns

BaseMessage<T>

Overrides

Base<T>.constructor

Source

twitchfy/packages/chatbot/src/structures/BaseMessage.ts:36

Properties

PropertyModifierTypeDescriptionInherited from
authorreadonlyBaseUser<T>The author of the message.-
chatbotreadonlyChatBot<T>The current instance of the chatbot.Base.chatbot
contentreadonlynull | stringThe content of the message.-
idreadonlystringThe id of the message.-

Accessors

chatroomId

1
get chatroomId(): string

The Id of the chatroom where the message was sent.

Returns

string

Source

twitchfy/packages/chatbot/src/structures/BaseMessage.ts:64


self

1
get self(): boolean

Whether the message was sent by the chatbot.

Returns

boolean

Source

twitchfy/packages/chatbot/src/structures/BaseMessage.ts:71

Methods

delete()

1
delete(): Promise<void>

Deletes the message from the chatroom.

Returns

Promise<void>

Source

twitchfy/packages/chatbot/src/structures/BaseMessage.ts:48


reply()

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

Replies to the message.

Parameters

ParameterTypeDescription
messagestringThe message to reply with.

Returns

Promise<BaseMessage<T>>

The message that was sent as a reply.

Source

twitchfy/packages/chatbot/src/structures/BaseMessage.ts:57