UNPKG

@twitchfy/chatbot

Version:

A powerful node module to make your own Twitch ChatBot

75 lines (74 loc) 1.97 kB
import type { Video as VideoData, MutedSegment, VideoType } from '@twitchfy/api-types'; import { Base } from './Base'; import { BaseUser } from './BaseUser'; import type { ChatBot } from './ChatBot'; import type { EventSubConnection } from '../enums'; import type { ThumbailOptions } from '../interfaces'; /** * Represents a Twitch video. */ export declare class Video<T extends EventSubConnection> extends Base<T> { /** * The id of the video. */ readonly id: string; /** * The id of the stream the video was created from. If the stream was ended this will be null. */ readonly streamId: string | null; /** * The user who created the video. */ readonly user: BaseUser<T>; /** * The title of the video. */ readonly title: string; /** * The description of the video. */ readonly description: string; /** * The video's url. */ readonly url: string; /** * The number of views the video has. */ readonly viewCount: number; /** * The language of the video. */ readonly language: string; /** * The type of the video. */ readonly type: VideoType; /** * The muted segments of the video. */ readonly mutedSegments: MutedSegment[] | null; /** * The data of the video from the API. */ private readonly data; constructor(chatbot: ChatBot<T>, data: VideoData); /** * The creation date of the video in JavaScript Date object. */ get createdAt(): Date; /** * The publish date of the video in JavaScript Date object. */ get publishedAt(): Date; /** * The thumbnail URL of the video. * @param options The options for the thumbnail. * @returns The thumbnail URL of the video. */ thumbnailURL(options?: ThumbailOptions): string; /** * The duration of the video in seconds. */ get duration(): number; }