Message
Represents a message in a chatroom.
Extends
BaseMessage
<T
>
Type parameters
Type parameter |
---|
T extends EventSubConnection |
Constructors
new Message()
Creates a new instance of the message.
Parameters
Parameter | Type | Description |
---|---|---|
chatbot | ChatBot <T > | The current instance of the chatbot. |
data | MessageData <T > | The data of the message. |
chatroom | ChatRoom <T > | The chatroom where the message was sent. |
Returns
Message
<T
>
Overrides
Source
twitchfy/packages/chatbot/src/structures/Message.ts:76
Properties
Property | Modifier | Type | Description | Overrides | Inherited from |
---|---|---|---|---|---|
author | readonly | BaseUser <T > | The author of the message. | BaseMessage .author | BaseMessage .author |
bits | readonly | number | The bits cheered in the message. | - | - |
chatbot | readonly | ChatBot <T > | The current instance of the chatbot. | BaseMessage .chatbot | BaseMessage .chatbot |
chatroom | readonly | ChatRoom <T > | The chatroom where the message was sent. | - | - |
cheermotes | readonly | Collection <string , BaseCheermote <T >> | The cheermotes in the message. | - | - |
content | readonly | string | The content of the message. | BaseMessage .content | BaseMessage .content |
emotes | readonly | Collection <string , BaseEmote <T , EmoteType >> | The emotes in the message. | - | - |
id | readonly | string | The id of the message. | BaseMessage .id | BaseMessage .id |
mentions | readonly | Collection <string , BaseUser <T >> | The mentions in the message. | - | - |
messageReply | readonly | null | MessageReply <T > | The message reply of the message. Null if the message doesn’t have a reply. | - | - |
rewardId | readonly | null | string | The reward Id of the message. Null if the message doesn’t have a reward redemption. | - | - |
type | readonly | MessageTypes | The type of the message. | - | - |
Accessors
authorId
The Id of the author of the message.
Returns
string
Source
twitchfy/packages/chatbot/src/structures/Message.ts:93
chatroomId
The Id of the chatroom where the message was sent.
Returns
string
Source
twitchfy/packages/chatbot/src/structures/BaseMessage.ts:64
hasRewardRedeemption
Whether the message has a reward reedemption.
Returns
boolean
Source
twitchfy/packages/chatbot/src/structures/Message.ts:142
isChannelPointsSubOnly
Whether the message was sent by the send in subscriber mode reward.
Returns
boolean
Source
twitchfy/packages/chatbot/src/structures/Message.ts:114
isHighlighted
Whether the message was highlighted by the highlight message reward.
Returns
boolean
Source
twitchfy/packages/chatbot/src/structures/Message.ts:107
isText
Whether the message is a normal text message.
Returns
boolean
Source
twitchfy/packages/chatbot/src/structures/Message.ts:100
isUserIntro
Whether the message is an user intro message.
Returns
boolean
Source
twitchfy/packages/chatbot/src/structures/Message.ts:121
parentReply
The message which was replied by this message. Null if the message doesn’t have a reply.
Returns
null
| MessageReplyParent
<T
>
Source
twitchfy/packages/chatbot/src/structures/Message.ts:128
self
Whether the message was sent by the chatbot.
Returns
boolean
Source
twitchfy/packages/chatbot/src/structures/BaseMessage.ts:71
threadReply
The start message of the thread where this message is part of. Null if the message is not part of a thread.
Returns
null
| MessageReplyThread
<T
>
Source
twitchfy/packages/chatbot/src/structures/Message.ts:135
Methods
delete()
Deletes the message from the chatroom.
Returns
Promise
<void
>
Inherited from
Source
twitchfy/packages/chatbot/src/structures/BaseMessage.ts:48
reply()
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.