UNPKG

telebot

Version:

The easy way to write Telegram bots.

13 lines (12 loc) 622 B
import { TeleBotEventNames, TeleBotEventProcessor } from "../types/telebot"; export declare type EventType = string; export declare type EventTypes = EventType | EventType[]; export declare type ComplexEventType = EventType; export declare type ComplexEvents = ComplexEventType | ComplexEventType[]; export declare class TeleBotEvents { private events; on<T extends keyof TeleBotEventNames>(event: T | T[], processor: TeleBotEventProcessor<T>): TeleBotEventProcessor<T>; dispatch<T>(event: EventTypes, data?: any): Promise<any[]>; off(processor: TeleBotEventProcessor<any>): void; private _dispatch; }