mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-18 12:02:11 +00:00
* refactor: move common info into MediaInfo * refactor: better inference on Memo * refactor: improved typesafety in parser methods * refactor: remove PlaylistAuthor in favor of Author * refactor: cleanup live chat parsers - Replace non standard author type with Author class - Remove redundant code * fix: new errors due to changes * fix: pass actions to FormatUtils#toDash * refactor!: merge NavigatableText and Text into single class
25 lines
789 B
TypeScript
25 lines
789 B
TypeScript
import Parser from '../../index.js';
|
|
import Button from '../Button.js';
|
|
import ToggleButton from '../ToggleButton.js';
|
|
import CreatorHeart from './CreatorHeart.js';
|
|
import { YTNode } from '../../helpers.js';
|
|
import type { RawNode } from '../../index.js';
|
|
|
|
class CommentActionButtons extends YTNode {
|
|
static type = 'CommentActionButtons';
|
|
|
|
like_button;
|
|
dislike_button;
|
|
reply_button;
|
|
creator_heart;
|
|
|
|
constructor(data: RawNode) {
|
|
super();
|
|
this.like_button = Parser.parseItem(data.likeButton, ToggleButton);
|
|
this.dislike_button = Parser.parseItem(data.dislikeButton, ToggleButton);
|
|
this.reply_button = Parser.parseItem(data.replyButton, Button);
|
|
this.creator_heart = Parser.parseItem(data.creatorHeart, CreatorHeart);
|
|
}
|
|
}
|
|
|
|
export default CommentActionButtons; |