Files
YouTube.js/examples/comments/README.md
LuanRT 34281e2445 refactor: migrate parsers to TS (#133)
* dev: finish top-level parsers TS migration

* dev: migrate menu renderers to TS

* chore: fix ts errors

* dev: finish ts migration 🎉
2022-08-20 03:18:17 -03:00

1.2 KiB

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 yt.getComments(VIDEO_ID);

API

contents

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

Type: CommentThread[]

createComment(text)

Creates a top-level comment.

Param Type Description
text string Comment content

Returns: Promise<ActionsResponse>

getContinuation()

Retrieves next batch of comment threads.

Returns: Promise.<Comments>

page

Returns original InnerTube response (sanitized).

Returns: ParsedResponse

Example

See index.ts.