youtubei.js / YTNodes / LiveChatViewerEngagementMessage
Class: LiveChatViewerEngagementMessage
Extends
LiveChatMessageBase
Constructors
new LiveChatViewerEngagementMessage()
new LiveChatViewerEngagementMessage(
data
):LiveChatViewerEngagementMessage
Parameters
• data: RawNode
Returns
LiveChatViewerEngagementMessage
Overrides
LiveChatMessageBase.constructor
Defined in
src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:12
Properties
action_button
action_button:
YTNode
Defined in
src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:10
icon_type?
optional
icon_type:string
Defined in
src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:9
id
id:
string
Inherited from
LiveChatMessageBase.id
Defined in
src/parser/classes/livechat/items/LiveChatTextMessage.ts:15
inline_action_buttons
inline_action_buttons:
ObservedArray
<Button
>
Inherited from
LiveChatMessageBase.inline_action_buttons
Defined in
src/parser/classes/livechat/items/LiveChatTextMessage.ts:13
message
message:
Text
Inherited from
LiveChatMessageBase.message
Defined in
src/parser/classes/livechat/items/LiveChatTextMessage.ts:12
timestamp
timestamp:
number
Inherited from
LiveChatMessageBase.timestamp
Defined in
src/parser/classes/livechat/items/LiveChatTextMessage.ts:14
type
readonly
type:string
Inherited from
LiveChatMessageBase.type
Defined in
type
static
type:string
='LiveChatViewerEngagementMessage'
Overrides
LiveChatMessageBase.type
Defined in
src/parser/classes/livechat/items/LiveChatViewerEngagementMessage.ts:7
Methods
as()
as<
T
,K
>(...types
):InstanceType
<K
[number
]>
Cast to one of the given types.
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• ...types: K
Returns
InstanceType
<K
[number
]>
Inherited from
LiveChatMessageBase.as
Defined in
hasKey()
hasKey<
T
,R
>(key
):this is LiveChatViewerEngagementMessage & { [k in string]: R }
Check for a key without asserting the type.
Type Parameters
• T extends string
• R = any
Parameters
• key: T
The key to check
Returns
this is LiveChatViewerEngagementMessage & { [k in string]: R }
Whether the node has the key
Inherited from
LiveChatMessageBase.hasKey
Defined in
is()
is<
T
,K
>(...types
):this is InstanceType<K[number]>
Check if the node is of the given type.
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• ...types: K
The type to check
Returns
this is InstanceType<K[number]>
whether the node is of the given type
Inherited from
LiveChatMessageBase.is
Defined in
key()
key<
T
,R
>(key
):Maybe
Assert that the node has the given key and return it.
Type Parameters
• T extends string
• R = any
Parameters
• key: T
The key to check
Returns
The value of the key wrapped in a Maybe
Throws
If the node does not have the key
Inherited from
LiveChatMessageBase.key