UNPKG

@twitchfy/chatbot

Version:

A powerful node module to make your own Twitch ChatBot

43 lines (42 loc) 1.43 kB
import type { StreamOnlineMessage } from '@twitchfy/eventsub'; import type { ChatBot } from './ChatBot'; import { Base } from './Base'; import { BaseStream } from './BaseStream'; import { BaseUser } from './BaseUser'; import type { EventSubConnectionMap } from '../interfaces'; import type { EventSubConnection } from '../enums'; /** * Represents a stream online event. */ export declare class StreamOnline<T extends EventSubConnection> extends Base<T> { /** * The broadcaster of the channel whose stream went online. */ readonly broadcaster: BaseUser<T>; /** * The stream which went online. */ readonly stream: BaseStream<T>; /** * The data of the stream online event returned from the EventSub. */ private data; /** * Creates a new instance of the stream online event. * @param chatbot The current instance of the chatbot. * @param data The data of the stream online event returned from the EventSub. */ constructor(chatbot: ChatBot<T>, data: StreamOnlineMessage<EventSubConnectionMap[T]>); /** * The Id of the broadcaster whose stream went online. */ get broadcasterId(): string; /** * The Id of the chatroom where the stream went online. */ get chatroomId(): string; /** * Returns the time when the stream went online. A JavaScript Date object is returned. */ get startedAt(): Date; }