This commit is contained in:
Luan
2024-11-09 16:22:41 -03:00
2 changed files with 36 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
import { YTNode } from '../../../helpers.js';
import type { RawNode } from '../../../index.js';
import NavigationEndpoint from '../../NavigationEndpoint.js';
import Author from '../../misc/Author.js';
import Text from '../../misc/Text.js';
export default class LiveChatSponsorshipsGiftRedemptionAnnouncement extends YTNode {
static type = 'LiveChatSponsorshipsGiftRedemptionAnnouncement';
id: string;
timestamp_usec: string;
timestamp_text: Text;
author: Author;
message: Text;
menu_endpoint: NavigationEndpoint;
context_menu_accessibility_label: string;
constructor(data: RawNode) {
super();
this.id = data.id;
this.timestamp_usec = data.timestampUsec;
this.timestamp_text = new Text(data.timestampText);
this.author = new Author(
data.authorName,
data.authorBadges,
data.authorPhoto,
data.authorExternalChannelId
);
this.message = new Text(data.message);
this.menu_endpoint = new NavigationEndpoint(data.contextMenuEndpoint);
this.context_menu_accessibility_label = data.contextMenuAccessibility.accessibilityData.label;
}
}

View File

@@ -188,6 +188,7 @@ export { default as LiveChatPlaceholderItem } from './classes/livechat/items/Liv
export { default as LiveChatProductItem } from './classes/livechat/items/LiveChatProductItem.js';
export { default as LiveChatRestrictedParticipation } from './classes/livechat/items/LiveChatRestrictedParticipation.js';
export { default as LiveChatSponsorshipsGiftPurchaseAnnouncement } from './classes/livechat/items/LiveChatSponsorshipsGiftPurchaseAnnouncement.js';
export { default as LiveChatSponsorshipsGiftRedemptionAnnouncement } from './classes/livechat/items/LiveChatSponsorshipsGiftRedemptionAnnouncement.js';
export { default as LiveChatSponsorshipsHeader } from './classes/livechat/items/LiveChatSponsorshipsHeader.js';
export { default as LiveChatTextMessage } from './classes/livechat/items/LiveChatTextMessage.js';
export { default as LiveChatTickerPaidMessageItem } from './classes/livechat/items/LiveChatTickerPaidMessageItem.js';