Files
YouTube.js/examples/comments/CommentThread.md
2024-04-11 18:03:04 -03:00

1.7 KiB

CommentThread

A CommentThread represents a top-level comment and its replies.

API

comment

The top-level comment. Note: More about the Comment node here (OUTDATED! Comment has been replaced by CommentView nodes).

Type: Comment

replies

An array of replies to the top-level comment. (not populated until getReplies() is called).

Type: (Comment | CommentView)[]

getReplies()

Retrieves replies to the top-level comment and attaches a replies array to the original CommentThread object and returns it.

Returns: Promise.<CommentThread>

getContinuation()

Retrieves next batch of replies and adds them to the replies array. Note: getReplies() must be called before using this.

Returns: Promise.<CommentThread>

has_continuation

Whether there are more replies to be retrieved.

Type: boolean

has_replies

Whether there are replies to the top-level comment.

Type: boolean