BaseMessage
The base class for a message.
Extends
Base<T>
Extended by
Type parameters
| Type parameter |
|---|
T extends EventSubConnection |
Constructors
new BaseMessage()
1new BaseMessage<T>(chatbot: ChatBot<T>, data: BaseMessageData): BaseMessage<T>Creates a new instance of the base message.
Parameters
| Parameter | Type | Description |
|---|---|---|
chatbot | ChatBot<T> | The current instance of the chatbot. |
data | BaseMessageData | The base data of the message. |
Returns
BaseMessage<T>
Overrides
Base<T>.constructor
Source
twitchfy/packages/chatbot/src/structures/BaseMessage.ts:36
Properties
| Property | Modifier | Type | Description | Inherited from |
|---|---|---|---|---|
author | readonly | BaseUser<T> | The author of the message. | - |
chatbot | readonly | ChatBot<T> | The current instance of the chatbot. | Base.chatbot |
content | readonly | null | string | The content of the message. | - |
id | readonly | string | The id of the message. | - |
Accessors
chatroomId
1get chatroomId(): stringThe Id of the chatroom where the message was sent.
Returns
string
Source
twitchfy/packages/chatbot/src/structures/BaseMessage.ts:64
self
1get self(): booleanWhether the message was sent by the chatbot.
Returns
boolean
Source
twitchfy/packages/chatbot/src/structures/BaseMessage.ts:71
Methods
delete()
1delete(): Promise<void>Deletes the message from the chatroom.
Returns
Promise<void>
Source
twitchfy/packages/chatbot/src/structures/BaseMessage.ts:48
reply()
1reply(message: string): Promise<BaseMessage<T>>Replies to the message.
Parameters
| Parameter | Type | Description |
|---|---|---|
message | string | The message to reply with. |
Returns
Promise<BaseMessage<T>>
The message that was sent as a reply.