feat(LiveChat): add support for moderation & more (#202)

* Live Chat - Implement moderation

* Live Chat - Implement class ItemMenu

* fix moderation method

Co-authored-by: LuanRT <luan.lrt4@gmail.com>
This commit is contained in:
Akazawa Daisuke
2022-10-02 14:00:24 +09:00
committed by GitHub
parent 95e0479745
commit 2f56c15ecc
9 changed files with 137 additions and 14 deletions

View File

@@ -23,6 +23,7 @@ class LiveChatPaidSticker extends YTNode {
sticker: Thumbnail[];
purchase_amount: string;
context_menu: NavigationEndpoint;
menu_endpoint?: NavigationEndpoint;
timestamp: number;
constructor(data: any) {
@@ -42,7 +43,8 @@ class LiveChatPaidSticker extends YTNode {
this.author_name_text_color = data.authorNameTextColor;
this.sticker = Thumbnail.fromResponse(data.sticker);
this.purchase_amount = new Text(data.purchaseAmountText).toString();
this.context_menu = new NavigationEndpoint(data.contextMenuEndpoint);
this.menu_endpoint = new NavigationEndpoint(data.contextMenuEndpoint);
this.context_menu = this.menu_endpoint;
this.timestamp = Math.floor(parseInt(data.timestampUsec) / 1000);
}
}