mirror of
https://github.com/LuanRT/YouTube.js.git
synced 2026-06-25 07:42:11 +00:00
feat(parser): Add ReplaceLiveChatAction (#847)
This commit is contained in:
15
src/parser/classes/livechat/ReplaceLiveChatAction.ts
Normal file
15
src/parser/classes/livechat/ReplaceLiveChatAction.ts
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -251,6 +251,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';
|
||||
|
||||
Reference in New Issue
Block a user