YouTube.js
Guide
Discord
❤️ Sponsor
GitHub
Guide
Discord
❤️ Sponsor
GitHub

youtubei.js / Managers / InteractionManager

Class: InteractionManager

Defined in: src/core/managers/InteractionManager.ts:7

Constructors

Constructor

new InteractionManager(actions): InteractionManager

Defined in: src/core/managers/InteractionManager.ts:10

Parameters

actions

Actions

Returns

InteractionManager

Methods

comment()

comment(video_id, text): Promise<ApiResponse>

Defined in: src/core/managers/InteractionManager.ts:119

Posts a comment on a given video.

Parameters

video_id

string

The video ID

text

string

The comment text

Returns

Promise<ApiResponse>


dislike()

dislike(video_id): Promise<ApiResponse>

Defined in: src/core/managers/InteractionManager.ts:38

Dislikes a given video.

Parameters

video_id

string

The video ID

Returns

Promise<ApiResponse>


like()

like(video_id): Promise<ApiResponse>

Defined in: src/core/managers/InteractionManager.ts:18

Likes a given video.

Parameters

video_id

string

The video ID

Returns

Promise<ApiResponse>


removeRating()

removeRating(video_id): Promise<ApiResponse>

Defined in: src/core/managers/InteractionManager.ts:58

Removes a like/dislike.

Parameters

video_id

string

The video ID

Returns

Promise<ApiResponse>


setNotificationPreferences()

setNotificationPreferences(channel_id, type): Promise<ApiResponse>

Defined in: src/core/managers/InteractionManager.ts:174

Changes notification preferences for a given channel. Only works with channels you are subscribed to.

Parameters

channel_id

string

The channel ID.

type

The notification type.

"PERSONALIZED" | "ALL" | "NONE"

Returns

Promise<ApiResponse>


subscribe()

subscribe(channel_id): Promise<ApiResponse>

Defined in: src/core/managers/InteractionManager.ts:78

Subscribes to the given channel.

Parameters

channel_id

string

The channel ID

Returns

Promise<ApiResponse>


translate()

translate(text, target_language, args): Promise<{ data: IRawResponse; status_code: number; success: boolean; translated_content: any; }>

Defined in: src/core/managers/InteractionManager.ts:151

Translates a given text using YouTube's comment translation feature.

Parameters

text

string

The text to translate

target_language

string

an ISO language code

args

optional arguments

comment_id?

string

video_id?

string

Returns

Promise<{ data: IRawResponse; status_code: number; success: boolean; translated_content: any; }>


unsubscribe()

unsubscribe(channel_id): Promise<ApiResponse>

Defined in: src/core/managers/InteractionManager.ts:98

Unsubscribes from the given channel.

Parameters

channel_id

string

The channel ID

Returns

Promise<ApiResponse>

Edit this page
Last Updated: 10/12/25, 3:23 PM