import { IBot } from './bot'; export declare type DecInfo = { name: string; handler(...args: any[]): AsyncGenerator | Promise; }; export declare type HelpInfo = DecInfo & { type: 'help'; }; export declare type StartInfo = DecInfo & { type: 'start'; }; export declare type ActionInfo = DecInfo & { type: 'action'; opts: IActionDecoratorOpts; }; export declare type CommandInfo = DecInfo & { type: 'command'; opts: ICommandDecoratorOpts; }; export declare type HearsInfo = DecInfo & { type: 'hears'; opts: IHearsDecoratorOpts; match: RegExp; }; export declare type MenuInfo = DecInfo & { type: 'callback_menu'; menuId: string; buttonId: string; }; export declare type CallbackQueryInfo = DecInfo & { type: 'callback_query'; }; export declare type InitInfo = CommandInfo | ActionInfo | HelpInfo | StartInfo | HearsInfo | MenuInfo | CallbackQueryInfo; export declare const SYM_EVENTS: unique symbol; export declare const SYM_CONTEXT: unique symbol; export declare const SYM_STATE: unique symbol; export declare const SYM_ONCE: unique symbol; export declare const SYM_PROMISE_REPLACE: unique symbol; export declare const SYM_HEAR_EXEC_COUNTS: unique symbol; export declare const SYM_CBHANDLER_FUNCTION: unique symbol; export declare const INIT_MAP: WeakMap; /** * Indicates whether the given object is generator-like or not. * * @export * @param {*} thing The object to check. * @returns {thing is AsyncGenerator} `true` if the given object is generator. */ export declare function isGenerator(thing: any): thing is AsyncGenerator; /** * Indicates whether the given object is promise-like or not. * * @export * @template T The type of the promise. * @param {*} thing The object to check. * @returns {thing is Promise} `true` if the given object is a promise. */ export declare function isPromise(thing: any): thing is Promise;