@twitchfy/chatbot
Version:
A powerful node module to make your own Twitch ChatBot
38 lines (37 loc) • 1.1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChatterManager = void 0;
const Base_1 = require("../Base");
/**
* Represents a chatter manager of a chatroom.
*/
class ChatterManager extends Base_1.Base {
/**
* The chatroom of the chatter manager.
*/
chatroom;
/**
* Creates a new instance of the chatter manager.
* @param chatbot The current instance of the chatbot.
* @param chatroom The chatroom of the chatter manager.
*/
constructor(chatbot, chatroom) {
super(chatbot);
this.chatroom = chatroom;
}
/**
* Fetches the chatters of the chatroom.
* @returns The chatters of the chatroom.
*/
async fetch() {
return await this.chatbot.chatters.fetch(this.chatroom.id);
}
/**
* Gets the amount of chatters in the chatroom.
* @returns The amount of chatters in the chatroom.
*/
async count() {
return await this.chatbot.chatters.count(this.chatroom.id);
}
}
exports.ChatterManager = ChatterManager;