mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-30 09:55:18 +00:00
feat: Add paid chat color info (#164)
This commit is contained in:
@@ -20,6 +20,10 @@ class LiveChatPaidMessage extends YTNode {
|
||||
is_verified_artist: boolean | null;
|
||||
};
|
||||
|
||||
header_background_color: number;
|
||||
header_text_color: number;
|
||||
body_background_color: number;
|
||||
body_text_color: number;
|
||||
purchase_amount: string;
|
||||
menu_endpoint: NavigationEndpoint;
|
||||
timestamp: number;
|
||||
@@ -47,6 +51,10 @@ class LiveChatPaidMessage extends YTNode {
|
||||
this.author.is_verified = badges?.some((badge: any) => badge.style == 'BADGE_STYLE_TYPE_VERIFIED') || null;
|
||||
this.author.is_verified_artist = badges?.some((badge: any) => badge.style == 'BADGE_STYLE_TYPE_VERIFIED_ARTIST') || null;
|
||||
|
||||
this.header_background_color = data.headerBackgroundColor;
|
||||
this.header_text_color = data.headerTextColor;
|
||||
this.body_background_color = data.bodyBackgroundColor;
|
||||
this.body_text_color = data.bodyTextColor;
|
||||
this.purchase_amount = new Text(data.purchaseAmountText).toString();
|
||||
this.menu_endpoint = new NavigationEndpoint(data.contextMenuEndpoint);
|
||||
this.timestamp = Math.floor(parseInt(data.timestampUsec) / 1000);
|
||||
|
||||
Reference in New Issue
Block a user