youtubei.js / YTNodes / LiveChatTextMessage
Class: LiveChatTextMessage
Extends
LiveChatMessageBase
Constructors
new LiveChatTextMessage()
new LiveChatTextMessage(
data
):LiveChatTextMessage
Parameters
• data: RawNode
Returns
Overrides
LiveChatMessageBase.constructor
Defined in
src/parser/classes/livechat/items/LiveChatTextMessage.ts:32
Properties
author
author:
Author
Defined in
src/parser/classes/livechat/items/LiveChatTextMessage.ts:29
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
menu_endpoint
menu_endpoint:
NavigationEndpoint
Defined in
src/parser/classes/livechat/items/LiveChatTextMessage.ts:30
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
='LiveChatTextMessage'
Overrides
LiveChatMessageBase.type
Defined in
src/parser/classes/livechat/items/LiveChatTextMessage.ts:27
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 LiveChatTextMessage & { [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 LiveChatTextMessage & { [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