@twitchfy/chatbot
Version:
A powerful node module to make your own Twitch ChatBot
42 lines (41 loc) • 1.24 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.StreamOffline = void 0;
const Base_1 = require("./Base");
const BaseUser_1 = require("./BaseUser");
/**
* Represents a stream offline event.
*/
class StreamOffline extends Base_1.Base {
/**
* The broadcaster of the channel whose stream went offline.
*/
broadcaster;
/**
* The data of the stream offline event returned from the EventSub.
*/
data;
/**
* Creates a new instance of the stream online event.
* @param chatbot The current instance of the chatbot.
* @param data The data of the stream online event returned from the EventSub.
*/
constructor(chatbot, data) {
super(chatbot);
this.data = data;
this.broadcaster = new BaseUser_1.BaseUser(chatbot, { ...data.broadcaster, display_name: data.broadcaster.displayName });
}
/**
* The Id of the broadcaster whose stream went offline.
*/
get broadcasterId() {
return this.data.broadcaster.id;
}
/**
* The Id of the chatroom where the stream went offline.
*/
get chatroomId() {
return this.data.broadcaster.id;
}
}
exports.StreamOffline = StreamOffline;