Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT committed Nov 15, 2024
2 parents dc2ed04 + ad302b8 commit c68810d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/parser/classes/livechat/items/LiveChatBannerRedirect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { YTNode } from '../../../helpers.js';
import type { RawNode } from '../../../index.js';
import { Parser } from '../../../index.js';
import Button from '../../Button.js';
import Text from '../../misc/Text.js';
import Thumbnail from '../../misc/Thumbnail.js';

export default class LiveChatBannerRedirect extends YTNode {
static type = 'LiveChatBannerRedirect';

banner_message: Text;
author_photo: Thumbnail[];
inline_action_button: Button | null;
context_menu_button: Button | null;

constructor(data: RawNode) {
super();
this.banner_message = new Text(data.bannerMessage);
this.author_photo = Thumbnail.fromResponse(data.authorPhoto);
this.inline_action_button = Parser.parseItem(data.inlineActionButton, Button);
this.context_menu_button = Parser.parseItem(data.contextMenuButton, Button);
}
}
1 change: 1 addition & 0 deletions src/parser/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export { default as LiveChatAutoModMessage } from './classes/livechat/items/Live
export { default as LiveChatBanner } from './classes/livechat/items/LiveChatBanner.js';
export { default as LiveChatBannerHeader } from './classes/livechat/items/LiveChatBannerHeader.js';
export { default as LiveChatBannerPoll } from './classes/livechat/items/LiveChatBannerPoll.js';
export { default as LiveChatBannerRedirect } from './classes/livechat/items/LiveChatBannerRedirect.js';
export { default as LiveChatMembershipItem } from './classes/livechat/items/LiveChatMembershipItem.js';
export { default as LiveChatPaidMessage } from './classes/livechat/items/LiveChatPaidMessage.js';
export { default as LiveChatPaidSticker } from './classes/livechat/items/LiveChatPaidSticker.js';
Expand Down

0 comments on commit c68810d

Please sign in to comment.