@twurple/chat
Version:
Interact with the Twitch Messaging Interface (aka Twitch chat).
20 lines (19 loc) • 581 B
JavaScript
import { Message } from 'ircv3';
import { ChatUser } from "../../../ChatUser.mjs";
import { parseEmoteOffsets } from "../../../utils/emoteUtil.mjs";
/** @private */
export class Whisper extends Message {
constructor(command, contents, config) {
super(command, contents, config, {
target: {},
text: { trailing: true },
});
}
get userInfo() {
return new ChatUser(this._prefix.nick, this._tags);
}
get emoteOffsets() {
return parseEmoteOffsets(this._tags.get('emotes'));
}
}
Whisper.COMMAND = 'WHISPER';