@twitchfy/chatbot
Version:
A powerful node module to make your own Twitch ChatBot
44 lines (43 loc) • 1.29 kB
TypeScript
import type { User as UserData } from '@twitchfy/api-types';
import type { ChatBot } from './ChatBot';
import { BaseUser } from './BaseUser';
import type { EventSubConnection } from '../enums';
/**
* Represents a Twitch user.
*/
export declare class User<T extends EventSubConnection> extends BaseUser<T> {
/**
* The description of the user.
*/
readonly description: string;
/**
* The profile image URL of the user.
*/
readonly profileImage: string;
/**
* The data of the user returned from the API.
*/
private readonly data;
/**
* Creates a new instance of the user.
* @param chatbot The current instance of the chatbot.
* @param data The data of the user returned from the API.
*/
constructor(chatbot: ChatBot<T>, data: UserData);
/**
* When the user was created. A JavaScript Date object is returned.
*/
get createdAt(): Date;
/**
* The user's type.
*/
get userType(): string;
/**
* The user's broadcaster type. Possible values are 'partner', 'affiliate' and 'normal'.
*/
get broadcasterType(): string;
/**
* The user's offline image url. Returns null if the user has no offline image set
*/
get offlineImage(): string | null;
}