UNPKG

@twitchfy/chatbot

Version:

A powerful node module to make your own Twitch ChatBot

42 lines (41 loc) 1.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ChannelChatClear = void 0; const Base_1 = require("./Base"); const BaseUser_1 = require("./BaseUser"); /** * Represents a channel chat clear event. */ class ChannelChatClear extends Base_1.Base { /** * The broadcaster of the channel whose chat was cleared. */ broadcaster; /** * The data of the chat clear event returned from the EventSub. */ data; /** * Creates a new instance of the channel chat clear event. * @param chatbot The current instance of the chatbot. * @param data The data of the chat clear 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 chat was cleared. */ get broadcasterId() { return this.data.broadcaster.id; } /** * The Id of the chatroom where the chat was cleared. */ get chatroomId() { return this.data.broadcaster.id; } } exports.ChannelChatClear = ChannelChatClear;