@twitchfy/chatbot
Version:
A powerful node module to make your own Twitch ChatBot
50 lines (49 loc) • 1.54 kB
TypeScript
import { Base } from './Base';
import type { BaseUserData } from './BaseUser';
import type { ChatBot } from './ChatBot';
import { User } from './User';
import type { EventSubConnection } from '../enums';
/**
* The base class for a user without an username.
*/
export declare class BaseUserWithoutUsername<T extends EventSubConnection> extends Base<T> {
/**
* The id of the user.
*/
readonly id: string;
/**
* The display name of the user.
*/
readonly dislayName: string;
/**
* Creates a new instance of the base user without an username.
* @param chatbot The current instance of the chatbot.
* @param data The base data of the user.
*/
constructor(chatbot: ChatBot<T>, data: Omit<BaseUserData, 'login'>);
/**
* Fetches the current user from the API.
* @returns The fetched user from the API.
*/
fetch(): Promise<User<T>>;
/**
* Returns the mention of the user.
*/
toString(): string;
/**
* Fetches the current stream of the user from the API.
* @returns The current stream or null if the stream is offline.
*/
stream(): Promise<import("./Stream").Stream<T> | null>;
/**
* Returns whether the user is currently in stream or not.
* @returns A boolean indicating whether the user is currently streaming.
*/
inStream(): Promise<boolean>;
/**
* Sends a whisper to the user.
* @param message The message to send.
* @returns
*/
whisper(message: string): Promise<void>;
}