v0.12.0
- BREAKING: Merged
MasterchatAgentintoMasterchat- Use
onandlisten.iterateandfetchare still available for advanced users
- Use
- BREAKING:
new Masterchat(..., {isLive?: boolean})->new Masterchat(..., {mode?: "live" | "replay"}) - Added type definition for
once - New
metadataproperty - BREAKING: Renamed
MasterchatManager->StreamPool - BREAKING: In
StreamPoolevent callback,(metadata: Metadata, ...) => {}->(..., mc: Masterchat) => {}- i.e.
on("actions", ({ videoId }, actions) => {})->on("actions", (actions, { videoId }) => {}) - e.g.
on("data", (data, mc) => { if (...) { mc.stop() } })
- i.e.
before:
const mc = new Masterchat(videoId, ...)
try {
for await (const { actions } of mc.iterate()) {
const chats = actions.filter(action => action.type === "addChatItemAction")
...
if (youWant) break;
}
} catch(err) {
...
}now:
const mc = new Masterchat(videoId, ...)
.on("chats", chats => {
...
if (youWant) mc.stop();
})
.on("error", err => {
...
})
mc.listen()utils
- BREAKING:
emojiHandlerinrunsToStringnow takesYTEmojiRuninstead ofYTEmoji - Added
textHandleroption torunsToString - BREAKING:
runsToStringwill expand truncated urls (Thanks @stu43005)