/// import * as debug from 'debug'; import * as Router from '@koa/router'; import type { Cipher, CipherOptions } from '@tenbot/cipher'; import type { WechatMessageType, WechatMessageText, WechatMessageImage, WechatMessageEvent, WechatMessageAttachment, WechatMessage } from '@tenbot/message'; import { Context, MessageContext } from './contexts'; import type { BotEventTypes, BotMessageHandler, BotPlugin } from './types'; export interface BotOptions extends Partial { name: string; webhook: string; directReply?: boolean; } export declare class Bot extends Context { readonly bot: this; readonly name: string; readonly webhook: string; readonly directReply: boolean; readonly cipher: Cipher; readonly messageHandlers: Map; readonly debug: debug.Debugger; constructor({ name, webhook, directReply, token, encodingAesKey, }: BotOptions); createContext(message: WechatMessage): MessageContext; createRouter(): Router; plugin>(plugin: BotPlugin, options?: T | boolean): this; onMessage(handler: BotMessageHandler): this; onText(handler: BotMessageHandler): this; onImage(handler: BotMessageHandler): this; onEvent(handler: BotMessageHandler): this; onAttachment(handler: BotMessageHandler): this; }