UNPKG

@twitchfy/chatbot

Version:

A powerful node module to make your own Twitch ChatBot

47 lines (46 loc) 1.24 kB
import type { GetClip, PostCreateClip } from '@twitchfy/api-types'; import { Base } from './Base'; import type { ChatBot } from './ChatBot'; import type { EventSubConnection } from '../enums'; /** * Represents the base class for all clips. */ export declare class BaseClip<T extends EventSubConnection> extends Base<T> { /** * The id of the clip. */ readonly id: string; /** * The url of the clip. */ readonly url: string; /** * Creates a new instance of the clip. * @param chatbot The current instance of the chatbot. * @param data The data of the clip returned from the API. */ constructor(chatbot: ChatBot<T>, data: PostCreateClip | GetClip); /** * * @returns The url of the clip. */ toString(): string; /** * Fetches the information of the clip from the API. * @returns The fetched clip. Returns null if the clip was not found (probably because it was not cached yet). */ fetch(): Promise<import("structures").Clip<T> | null>; } /** * The base data of a clip. */ export interface BaseClipData { /** * The id of the clip. */ id: string; /** * The url of the clip. */ url: string; }