UNPKG

@twitchfy/chatbot

Version:

A powerful node module to make your own Twitch ChatBot

23 lines (22 loc) 1.04 kB
import type { SubscriptionType } from '@twitchfy/eventsub'; import { SubscriptionTypes, type SubscriptionMessage } from '@twitchfy/eventsub'; import { type ChatBot } from '../structures'; import type { EventSubConnection } from '../enums'; import type { EventSubConnectionMap } from '../interfaces'; import type { ChannelEvents } from '../types'; /** * Handle the event received from the EventSub. * @param this The current instance of the chatbot. * @param message The message received from the EventSub. * @param subscription The subscription received from EventSub. * @returns * @internal */ export declare function handleEvent<T extends EventSubConnection>(this: ChatBot<T>, message: SubscriptionMessage<EventSubConnectionMap[T]>, subscription: SubscriptionType<SubscriptionTypes, EventSubConnectionMap[T]>): Promise<any>; /** * Get the key of the subscription type. * @param value The value of the subscription. * @returns * @internal */ export declare function getSubscriptonKey(value: string): ChannelEvents | undefined;