Files
YouTube.js/examples/comments
2022-08-03 17:06:00 -03:00
..
2022-08-03 17:06:00 -03:00
2022-08-03 17:06:00 -03:00

Comments

YouTube.js has full support for comments, including comment actions such as liking, disliking, replying etc.

Usage

Get a Comments instance:

const comments = await session.getComments(VIDEO_ID);

API

contents

A list of comment threads. Note: More about comment threads here.

Type: CommentThread[]

comment(text)

Posts a top-level comment.

Param Type Description
text string Comment content

Returns: Promise.<object>

getContinuation()

Retrieves next batch of comment threads.

Returns: Promise.<Comments>

page

Returns original InnerTube response (sanitized).

Returns: Promise.<object>

Example

See index.ts.