UNPKG

@twitchfy/chatbot

Version:

A powerful node module to make your own Twitch ChatBot

48 lines (47 loc) 1.5 kB
import type { Cheermote as CheermoteData, CheermoteType } from '@twitchfy/api-types'; import type { ChatBot } from './ChatBot'; import { Base } from './Base'; import { CheermoteTier } from './CheermoteTier'; import type { CheermoteURLOptions } from '../interfaces'; import type { EventSubConnection } from '../enums'; /** * Represents a Twitch cheermote. */ export declare class Cheermote<T extends EventSubConnection> extends Base<T> { /** * The type of the cheermote. */ readonly type: CheermoteType; /** * The prefix of the cheermote. */ readonly prefix: string; /** * The tiers of the cheermote. */ readonly tiers: CheermoteTier<T>[]; /** * Whether the cheermote is charitable. */ readonly isCharitable: boolean; /** * The data of the cheermote returned from the API. */ private data; /** * Creates a new instance of the cheermote. * @param chatbot The current instance of the chatbot. * @param data The data of the cheermote returned from the API. */ constructor(chatbot: ChatBot<T>, data: CheermoteData); /** * Returns the last updated date of the cheermote in a JavaScript Date object. */ get lastUpdated(): Date; /** * Get the URL of the image of cheermote. * @param options The options to get the URL of the cheermote. * @returns The URL of the image of the cheermote. */ getURL(options: CheermoteURLOptions): string | null; }