@twitchfy/chatbot
Version:
A powerful node module to make your own Twitch ChatBot
42 lines (41 loc) • 1.4 kB
TypeScript
import type { GlobalEmote, ChannelEmote } from '@twitchfy/api-types';
import type { ChatBot } from './ChatBot';
import { BaseEmote } from './BaseEmote';
import type { EmoteURLOptions } from '../interfaces';
import type { EventSubConnection } from '../enums';
/**
* Represents a Twitch emote. It could be either a global emote or a channel emote.
*/
export declare class Emote<T extends EventSubConnection, K extends 'global' | 'channel'> extends BaseEmote<T, K> {
/**
* The data of the emote returned from the API.
*/
protected emoteData: (GlobalEmote | ChannelEmote) & {
template: string;
owner_id: string;
};
/**
* Creates a new instance of the emote.
* @param chatbot The current instance of the chatbot.
* @param data The data of the emote returned from the API.
*/
constructor(chatbot: ChatBot<T>, data: (GlobalEmote | ChannelEmote) & {
template: string;
owner_id: string;
emote_set_id: string;
});
/**
* Checks whether the emote is light theme.
*/
get hasLightTheme(): boolean;
/**
* Checks whether the emote is dark theme.
*/
get hasDarkTheme(): boolean;
/**
* Gets the URL of the emote.
* @param options The options to get the URL of the emote.
* @returns Returns the URL of the emote.
*/
getURL(options?: EmoteURLOptions): string;
}