Skip to content

Commit

Permalink
feat: add LiveChatRestrictedParticipation node (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuanRT authored Dec 31, 2022
1 parent 9ac5043 commit 1163125
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { YTNode } from '../../../helpers';
import Text from '../../misc/Text';

class LiveChatRestrictedParticipation extends YTNode {
message: Text;
icon_type?: string;

constructor(data: any) {
super();
this.message = new Text(data.message);
this.icon_type = data?.icon?.iconType;
// TODO: parse onClickCommand
}
}

export default LiveChatRestrictedParticipation;
2 changes: 2 additions & 0 deletions src/parser/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ import { default as LiveChatPaidMessage } from './classes/livechat/items/LiveCha
import { default as LiveChatPaidSticker } from './classes/livechat/items/LiveChatPaidSticker';
import { default as LiveChatPlaceholderItem } from './classes/livechat/items/LiveChatPlaceholderItem';
import { default as LiveChatProductItem } from './classes/livechat/items/LiveChatProductItem';
import { default as LiveChatRestrictedParticipation } from './classes/livechat/items/LiveChatRestrictedParticipation';
import { default as LiveChatTextMessage } from './classes/livechat/items/LiveChatTextMessage';
import { default as LiveChatTickerPaidMessageItem } from './classes/livechat/items/LiveChatTickerPaidMessageItem';
import { default as LiveChatTickerPaidStickerItem } from './classes/livechat/items/LiveChatTickerPaidStickerItem';
Expand Down Expand Up @@ -411,6 +412,7 @@ export const YTNodes = {
LiveChatPaidSticker,
LiveChatPlaceholderItem,
LiveChatProductItem,
LiveChatRestrictedParticipation,
LiveChatTextMessage,
LiveChatTickerPaidMessageItem,
LiveChatTickerPaidStickerItem,
Expand Down

0 comments on commit 1163125

Please sign in to comment.