UNPKG

@twitchfy/chatbot

Version:

A powerful node module to make your own Twitch ChatBot

46 lines (45 loc) 1.44 kB
import type { ChannelFollowMessage } from '@twitchfy/eventsub'; import { Base } from './Base'; import type { ChatBot } from './ChatBot'; import { BaseUser } from './BaseUser'; import type { EventSubConnection } from '../enums'; import type { EventSubConnectionMap } from '../interfaces'; /** * Represents a channel follow event. */ export declare class ChannelFollow<T extends EventSubConnection> extends Base<T> { /** * The broadcaster of the channel who was followed. */ readonly broadcaster: BaseUser<T>; /** * The follower who followed the channel. */ readonly follower: BaseUser<T>; /** * The date when the follower followed the channel. */ readonly followedAt: Date; /** * The data of the follow event returned from the EventSub. */ private data; /** * Creates a new instance of the channel follow event. * @param chatbot The current instance of the chatbot. * @param data The data of the follow event returned from the EventSub. */ constructor(chatbot: ChatBot<T>, data: ChannelFollowMessage<EventSubConnectionMap[T]>); /** * The Id of the broadcaster who was followed. */ get broadcasterId(): string; /** * The Id of the follower who followed the channel. */ get followerId(): string; /** * The Id of the chatroom where the follow event occurred. */ get chatroomId(): string; }