UNPKG

@twitchfy/chatbot

Version:

A powerful node module to make your own Twitch ChatBot

27 lines (26 loc) 845 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ChatBotUserManager = void 0; const Base_1 = require("../Base"); const User_1 = require("../User"); /** * The user manager of the chatbot. */ class ChatBotUserManager extends Base_1.Base { /** * Creates a new instance of the user manager. * @param chatbot The current instance of the chatbot. */ constructor(chatbot) { super(chatbot); } /** * Fetches a specific user. * @param userIdentificator The id or login of the user to fetch. * @returns A class representation of the user. See {@link User}. */ async fetch(userIdentificator) { return new User_1.User(this.chatbot, await this.chatbot.helixClient.getUser(userIdentificator)); } } exports.ChatBotUserManager = ChatBotUserManager;