Skip to content

Commit

Permalink
feat(parser): Add ReplaceLiveChatAction
Browse files Browse the repository at this point in the history
  • Loading branch information
jonz94 committed Dec 15, 2024
1 parent 523700b commit 98aca9d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/parser/classes/livechat/ReplaceLiveChatAction.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { YTNode } from '../../helpers.js';
import { Parser, type RawNode } from '../../index.js';

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

to_replace: string;
replacement: YTNode | null;

constructor(data: RawNode) {
super();
this.to_replace = data.toReplace;
this.replacement = Parser.parseItem(data.replacement);
}
}
1 change: 1 addition & 0 deletions src/parser/nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ export { default as RemoveBannerForLiveChatCommand } from './classes/livechat/Re
export { default as RemoveChatItemAction } from './classes/livechat/RemoveChatItemAction.js';
export { default as RemoveChatItemByAuthorAction } from './classes/livechat/RemoveChatItemByAuthorAction.js';
export { default as ReplaceChatItemAction } from './classes/livechat/ReplaceChatItemAction.js';
export { default as ReplaceLiveChatAction } from './classes/livechat/ReplaceLiveChatAction.js';
export { default as ReplayChatItemAction } from './classes/livechat/ReplayChatItemAction.js';
export { default as ShowLiveChatActionPanelAction } from './classes/livechat/ShowLiveChatActionPanelAction.js';
export { default as ShowLiveChatDialogAction } from './classes/livechat/ShowLiveChatDialogAction.js';
Expand Down

0 comments on commit 98aca9d

Please sign in to comment.