From 91847ae3cc8665f7eb2d0998562c54e0fbadd99e Mon Sep 17 00:00:00 2001 From: LuanRT Date: Sat, 10 Sep 2022 14:54:13 -0300 Subject: [PATCH] feat(LiveChat): add `SegmentedLikeDislikeButton` and `LiveChatDialog` (#181) * feat: add `LiveChatDialog` * feat: add `SegmentedLikeDislikeButton` --- src/parser/classes/LiveChatDialog.ts | 19 +++++++++++++++++++ .../classes/SegmentedLikeDislikeButton.ts | 18 ++++++++++++++++++ src/parser/map.ts | 4 ++++ 3 files changed, 41 insertions(+) create mode 100644 src/parser/classes/LiveChatDialog.ts create mode 100644 src/parser/classes/SegmentedLikeDislikeButton.ts diff --git a/src/parser/classes/LiveChatDialog.ts b/src/parser/classes/LiveChatDialog.ts new file mode 100644 index 00000000..ca63f887 --- /dev/null +++ b/src/parser/classes/LiveChatDialog.ts @@ -0,0 +1,19 @@ +import Parser from '..'; +import Text from './misc/Text'; +import Button from './Button'; +import { YTNode } from '../helpers'; + +class LiveChatDialog extends YTNode { + static type = 'LiveChatDialog'; + + confirm_button: Button | null; + dialog_messages: Text[]; + + constructor (data: any) { + super(); + this.confirm_button = Parser.parseItem