diff --git a/src/parser/classes/livechat/items/LiveChatBannerRedirect.ts b/src/parser/classes/livechat/items/LiveChatBannerRedirect.ts new file mode 100644 index 000000000..56f8dce5d --- /dev/null +++ b/src/parser/classes/livechat/items/LiveChatBannerRedirect.ts @@ -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); + } +} \ No newline at end of file diff --git a/src/parser/nodes.ts b/src/parser/nodes.ts index 7214960d6..b44c214c0 100644 --- a/src/parser/nodes.ts +++ b/src/parser/nodes.ts @@ -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';