UNPKG

@twitchfy/chatbot

Version:

A powerful node module to make your own Twitch ChatBot

44 lines (43 loc) 1.42 kB
import type { Cheermote as CheermoteData } from '@twitchfy/eventsub'; import { Cheermote } from './Cheermote'; import { Base } from './Base'; import type { ChatBot } from './ChatBot'; import type { EventSubConnection } from '../enums'; /** * Represents a base cheermote returned by the EventSub. */ export declare class BaseCheermote<T extends EventSubConnection> extends Base<T> { /** * The bits that were cheered with the cheermote. */ readonly bits: number; /** * The prefix of the cheermote. */ readonly prefix: string; /** * The tier level of the cheermote. */ readonly tier: number; /** * The data of the cheermote returned by the EventSub. */ private data; /** * Creates a new instance of the base cheermote. * @param chatbot The current instance of the chatbot. * @param data The data of the cheermote returned by the EventSub. */ constructor(chatbot: ChatBot<T>, data: CheermoteData & { broadcaster_id: string; }); /** * The content of the cheermote. This is the prefix followed by the bits cheered. */ get content(): string; /** * Fetches the cheermote from the API returning the information of it. * @returns The cheermote if it exists. If not it will return `null` (basically this is 99.99% impossible). */ fetch(): Promise<Cheermote<T> | null>; }