import * as PUPPET from '@juzi/wechaty-puppet'; import type { SayableSayer, Sayable } from '../sayable/mod.js'; import { WechatySkeleton } from './wechaty-skeleton.js'; import type { WechatyInterface } from './wechaty-impl.js'; import type { WechatyOptions } from '../schemas/wechaty-options.js'; import type { PostInterface } from '../user-modules/post.js'; declare const mixinBase: (abstract new (...args: any[]) => { state: import("state-switch/dist/esm/src/interfaces.js").StateSwitchInterface; __serviceCtlResettingIndicator: import("state-switch/dist/esm/src/busy-indicator.js").BusyIndicator; __serviceCtlLogger: import("brolog/dist/esm/src/logger.js").Loggable; start(): Promise; stop(): Promise; reset(): Promise; onStart(): Promise; onStop(): Promise; emit(..._: any[]): any; }) & { VERSION: string; } & ((abstract new (...args: any[]) => { use(...plugins: (import("../plugin.js").WechatyPlugin | import("../plugin.js").WechatyPlugin[])[]): import("../plugin.js").WechatyPluginUninstaller; readonly log: import("brolog/dist/esm/src/logger.js").Loggable; readonly id: string; __memory?: import("memory-card").MemoryCard | undefined; readonly memory: import("memory-card").MemoryCard; __options: WechatyOptions; init: (() => Promise) & (() => Promise) & (() => Promise); start: (() => Promise) & (() => Promise) & (() => Promise); stop: (() => Promise) & (() => Promise) & (() => Promise); on(event: "error" | "ready" | "tag" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "room-announce" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "contact-tag-add" | "contact-tag-remove" | "contact-name" | "contact-alias" | "contact-phone" | "contact-description" | "contact-corporation" | "room-owner" | "tag-group" | "post-comment" | "post-tap" | "verify-code" | "dirty" | "login-url", listener: (...args: any[]) => any): any; addListener(event: E, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E]): any; once(event: E_1, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_1]): any; prependListener(event: E_2, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_2]): any; prependOnceListener(event: E_3, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_3]): any; off(event: E_4, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_4]): any; removeAllListeners(event?: E_5 | undefined): any; removeListener(event: E_6, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_6]): any; emit: ((event: E_7, ...args: import("typed-emitter").Arguments) => boolean) & ((event: any, ...args: any) => boolean); eventNames(): (string | symbol)[]; rawListeners(event: E_8): Function[]; listeners(event: E_9): Function[]; listenerCount(event: E_10): number; getMaxListeners(): number; setMaxListeners(maxListeners: number): any; __events: import("../schemas/wechaty-events.js").WechatyEventListeners; wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync; emitError(e: any): void; toString: (() => string) & (() => string); name(): string; version(): string; sleep(milliseconds: number): Promise; ding(data?: string | undefined): void; __puppet?: PUPPET.impls.PuppetInterface | undefined; readonly puppet: PUPPET.impls.PuppetInterface; readonly __readyState: import("state-switch/dist/esm/src/interfaces.js").StateSwitchInterface; __loginIndicator: import("state-switch/dist/esm/src/boolean-indicator.js").BooleanIndicator; __puppetMixinInited: boolean; ready(): Promise; __setupPuppetEvents(puppet: PUPPET.impls.PuppetInterface): void; __wechatifiedContact?: import("../user-modules/contact.js").ContactConstructor | undefined; __wechatifiedContactSelf?: import("../user-modules/contact-self.js").ContactSelfConstructor | undefined; __wechatifiedDelay?: import("../user-modules/delay.js").DelayConstructor | undefined; __wechatifiedFriendship?: import("../user-modules/friendship.js").FriendshipConstructor | undefined; __wechatifiedImage?: import("../user-modules/image.js").ImageConstructor | undefined; __wechatifiedLocation?: import("../user-modules/location.js").LocationConstructor | undefined; __wechatifiedMessage?: import("../user-modules/message.js").MessageConstructor | undefined; __wechatifiedMiniProgram?: import("../user-modules/mini-program.js").MiniProgramConstructor | undefined; __wechatifiedPost?: import("../user-modules/post.js").PostConstructor | undefined; __wechatifiedRoom?: import("../user-modules/room.js").RoomConstructor | undefined; __wechatifiedRoomInvitation?: import("../user-modules/room-invitation.js").RoomInvitationConstructor | undefined; __wechatifiedTag?: import("../user-modules/tag.js").TagConstructor | undefined; __wechatifiedTagGroup?: import("../user-modules/tag-group.js").TagGroupConstructor | undefined; __wechatifiedUrlLink?: import("../user-modules/url-link.js").UrlLinkConstructor | undefined; __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined; __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined; __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined; __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined; __wechatifiedWecom?: import("../user-modules/wecom.js").WecomConstructor | undefined; readonly Contact: import("../user-modules/contact.js").ContactConstructor; /** * Main bot class. * * A `Bot` is a WeChat client depends on which puppet you use. * It may equals * - web-WeChat, when you use: [puppet-puppeteer](https://github.com/wechaty/wechaty-puppet-puppeteer)/[puppet-wechat4u](https://github.com/wechaty/wechaty-puppet-wechat4u) * - ipad-WeChat, when you use: [puppet-padchat](https://github.com/wechaty/wechaty-puppet-padchat) * - ios-WeChat, when you use: puppet-ioscat * * See more: * - [What is a Puppet in Wechaty](https://github.com/wechaty/getting-started/wiki/FAQ#31-what-is-a-puppet-in-wechaty) * * > If you want to know how to send message, see [Message](#Message)
* > If you want to know how to get contact, see [Contact](#Contact) * * @example The World's Shortest ChatBot Code: 6 lines of JavaScript * import { WechatyBuilder } from 'wechaty' * const bot = WechatyBuilder.build() * bot.on('scan', (qrCode, status) => console.log('https://wechaty.js.org/qrcode/' + encodeURIComponent(qrcode))) * bot.on('login', user => console.log(`User ${user} logged in`)) * bot.on('message', message => console.log(`Message: ${message}`)) * bot.start() */ readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor; readonly Delay: import("../user-modules/delay.js").DelayConstructor; readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor; readonly Image: import("../user-modules/image.js").ImageConstructor; readonly Location: import("../user-modules/location.js").LocationConstructor; readonly Message: import("../user-modules/message.js").MessageConstructor; readonly MiniProgram: import("../user-modules/mini-program.js").MiniProgramConstructor; readonly Post: import("../user-modules/post.js").PostConstructor; readonly Room: import("../user-modules/room.js").RoomConstructor; readonly RoomInvitation: import("../user-modules/room-invitation.js").RoomInvitationConstructor; readonly Tag: import("../user-modules/tag.js").TagConstructor; readonly TagGroup: import("../user-modules/tag-group.js").TagGroupConstructor; readonly UrlLink: import("../user-modules/url-link.js").UrlLinkConstructor; readonly Channel: import("../user-modules/channel.js").ChannelConstructor; readonly Moment: import("../user-modules/moment.js").MomentConstructor; readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor; readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor; readonly Wecom: import("../user-modules/wecom.js").WecomConstructor; __io?: import("../io.js").Io | undefined; readonly io: import("../io.js").Io; __ioToken?: string | undefined; }) & { readonly log: import("brolog/dist/esm/src/logger.js").Loggable; }) & ((abstract new (...args: any[]) => { toString(): string; name(): string; version(): string; sleep(milliseconds: number): Promise; ding(data?: string | undefined): void; readonly log: import("brolog/dist/esm/src/logger.js").Loggable; readonly id: string; __memory?: import("memory-card").MemoryCard | undefined; readonly memory: import("memory-card").MemoryCard; __options: WechatyOptions; init: (() => Promise) & (() => Promise) & (() => Promise); start: (() => Promise) & (() => Promise) & (() => Promise); stop: (() => Promise) & (() => Promise) & (() => Promise); on(event: "error" | "ready" | "tag" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "room-announce" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "contact-tag-add" | "contact-tag-remove" | "contact-name" | "contact-alias" | "contact-phone" | "contact-description" | "contact-corporation" | "room-owner" | "tag-group" | "post-comment" | "post-tap" | "verify-code" | "dirty" | "login-url", listener: (...args: any[]) => any): any; addListener(event: E_11, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_11]): any; once(event: E_12, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_12]): any; prependListener(event: E_13, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_13]): any; prependOnceListener(event: E_14, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_14]): any; off(event: E_15, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_15]): any; removeAllListeners(event?: E_16 | undefined): any; removeListener(event: E_17, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_17]): any; emit: ((event: E_7, ...args: import("typed-emitter").Arguments) => boolean) & ((event: any, ...args: any) => boolean); eventNames(): (string | symbol)[]; rawListeners(event: E_8): Function[]; listeners(event: E_9): Function[]; listenerCount(event: E_10): number; getMaxListeners(): number; setMaxListeners(maxListeners: number): any; __events: import("../schemas/wechaty-events.js").WechatyEventListeners; __puppet?: PUPPET.impls.PuppetInterface | undefined; readonly puppet: PUPPET.impls.PuppetInterface; readonly __readyState: import("state-switch/dist/esm/src/interfaces.js").StateSwitchInterface; __loginIndicator: import("state-switch/dist/esm/src/boolean-indicator.js").BooleanIndicator; __puppetMixinInited: boolean; ready(): Promise; __setupPuppetEvents(puppet: PUPPET.impls.PuppetInterface): void; __wechatifiedContact?: import("../user-modules/contact.js").ContactConstructor | undefined; __wechatifiedContactSelf?: import("../user-modules/contact-self.js").ContactSelfConstructor | undefined; __wechatifiedDelay?: import("../user-modules/delay.js").DelayConstructor | undefined; __wechatifiedFriendship?: import("../user-modules/friendship.js").FriendshipConstructor | undefined; __wechatifiedImage?: import("../user-modules/image.js").ImageConstructor | undefined; __wechatifiedLocation?: import("../user-modules/location.js").LocationConstructor | undefined; __wechatifiedMessage?: import("../user-modules/message.js").MessageConstructor | undefined; __wechatifiedMiniProgram?: import("../user-modules/mini-program.js").MiniProgramConstructor | undefined; __wechatifiedPost?: import("../user-modules/post.js").PostConstructor | undefined; __wechatifiedRoom?: import("../user-modules/room.js").RoomConstructor | undefined; __wechatifiedRoomInvitation?: import("../user-modules/room-invitation.js").RoomInvitationConstructor | undefined; __wechatifiedTag?: import("../user-modules/tag.js").TagConstructor | undefined; __wechatifiedTagGroup?: import("../user-modules/tag-group.js").TagGroupConstructor | undefined; __wechatifiedUrlLink?: import("../user-modules/url-link.js").UrlLinkConstructor | undefined; __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined; __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined; __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined; __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined; __wechatifiedWecom?: import("../user-modules/wecom.js").WecomConstructor | undefined; readonly Contact: import("../user-modules/contact.js").ContactConstructor; /** * Main bot class. * * A `Bot` is a WeChat client depends on which puppet you use. * It may equals * - web-WeChat, when you use: [puppet-puppeteer](https://github.com/wechaty/wechaty-puppet-puppeteer)/[puppet-wechat4u](https://github.com/wechaty/wechaty-puppet-wechat4u) * - ipad-WeChat, when you use: [puppet-padchat](https://github.com/wechaty/wechaty-puppet-padchat) * - ios-WeChat, when you use: puppet-ioscat * * See more: * - [What is a Puppet in Wechaty](https://github.com/wechaty/getting-started/wiki/FAQ#31-what-is-a-puppet-in-wechaty) * * > If you want to know how to send message, see [Message](#Message)
* > If you want to know how to get contact, see [Contact](#Contact) * * @example The World's Shortest ChatBot Code: 6 lines of JavaScript * import { WechatyBuilder } from 'wechaty' * const bot = WechatyBuilder.build() * bot.on('scan', (qrCode, status) => console.log('https://wechaty.js.org/qrcode/' + encodeURIComponent(qrcode))) * bot.on('login', user => console.log(`User ${user} logged in`)) * bot.on('message', message => console.log(`Message: ${message}`)) * bot.start() */ readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor; readonly Delay: import("../user-modules/delay.js").DelayConstructor; readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor; readonly Image: import("../user-modules/image.js").ImageConstructor; readonly Location: import("../user-modules/location.js").LocationConstructor; readonly Message: import("../user-modules/message.js").MessageConstructor; readonly MiniProgram: import("../user-modules/mini-program.js").MiniProgramConstructor; readonly Post: import("../user-modules/post.js").PostConstructor; readonly Room: import("../user-modules/room.js").RoomConstructor; readonly RoomInvitation: import("../user-modules/room-invitation.js").RoomInvitationConstructor; readonly Tag: import("../user-modules/tag.js").TagConstructor; readonly TagGroup: import("../user-modules/tag-group.js").TagGroupConstructor; readonly UrlLink: import("../user-modules/url-link.js").UrlLinkConstructor; readonly Channel: import("../user-modules/channel.js").ChannelConstructor; readonly Moment: import("../user-modules/moment.js").MomentConstructor; readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor; readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor; readonly Wecom: import("../user-modules/wecom.js").WecomConstructor; wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync; emitError(e: any): void; __io?: import("../io.js").Io | undefined; readonly io: import("../io.js").Io; __ioToken?: string | undefined; }) & { readonly log: import("brolog/dist/esm/src/logger.js").Loggable; }) & ((abstract new (...args: any[]) => { readonly authQrCode: string | undefined; readonly currentUser: import("../user-modules/contact-self.js").ContactSelfInterface; readonly isLoggedIn: boolean; __loginMixinInited: boolean; init(): Promise; logout(reason?: string | undefined): Promise; logonoff(): boolean; userSelf(): import("../user-modules/contact-self.js").ContactSelfInterface; readonly log: import("brolog/dist/esm/src/logger.js").Loggable; readonly id: string; __memory?: import("memory-card").MemoryCard | undefined; readonly memory: import("memory-card").MemoryCard; __options: WechatyOptions; start: (() => Promise) & (() => Promise) & (() => Promise); stop: (() => Promise) & (() => Promise) & (() => Promise); on(event: "error" | "ready" | "tag" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "room-announce" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "contact-tag-add" | "contact-tag-remove" | "contact-name" | "contact-alias" | "contact-phone" | "contact-description" | "contact-corporation" | "room-owner" | "tag-group" | "post-comment" | "post-tap" | "verify-code" | "dirty" | "login-url", listener: (...args: any[]) => any): any; addListener(event: E_18, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_18]): any; once(event: E_19, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_19]): any; prependListener(event: E_20, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_20]): any; prependOnceListener(event: E_21, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_21]): any; off(event: E_22, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_22]): any; removeAllListeners(event?: E_23 | undefined): any; removeListener(event: E_24, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_24]): any; emit: ((event: E_7, ...args: import("typed-emitter").Arguments) => boolean) & ((event: any, ...args: any) => boolean); eventNames(): (string | symbol)[]; rawListeners(event: E_8): Function[]; listeners(event: E_9): Function[]; listenerCount(event: E_10): number; getMaxListeners(): number; setMaxListeners(maxListeners: number): any; __events: import("../schemas/wechaty-events.js").WechatyEventListeners; __puppet?: PUPPET.impls.PuppetInterface | undefined; readonly puppet: PUPPET.impls.PuppetInterface; readonly __readyState: import("state-switch/dist/esm/src/interfaces.js").StateSwitchInterface; __loginIndicator: import("state-switch/dist/esm/src/boolean-indicator.js").BooleanIndicator; __puppetMixinInited: boolean; ready(): Promise; __setupPuppetEvents(puppet: PUPPET.impls.PuppetInterface): void; __wechatifiedContact?: import("../user-modules/contact.js").ContactConstructor | undefined; __wechatifiedContactSelf?: import("../user-modules/contact-self.js").ContactSelfConstructor | undefined; __wechatifiedDelay?: import("../user-modules/delay.js").DelayConstructor | undefined; __wechatifiedFriendship?: import("../user-modules/friendship.js").FriendshipConstructor | undefined; __wechatifiedImage?: import("../user-modules/image.js").ImageConstructor | undefined; __wechatifiedLocation?: import("../user-modules/location.js").LocationConstructor | undefined; __wechatifiedMessage?: import("../user-modules/message.js").MessageConstructor | undefined; __wechatifiedMiniProgram?: import("../user-modules/mini-program.js").MiniProgramConstructor | undefined; __wechatifiedPost?: import("../user-modules/post.js").PostConstructor | undefined; __wechatifiedRoom?: import("../user-modules/room.js").RoomConstructor | undefined; __wechatifiedRoomInvitation?: import("../user-modules/room-invitation.js").RoomInvitationConstructor | undefined; __wechatifiedTag?: import("../user-modules/tag.js").TagConstructor | undefined; __wechatifiedTagGroup?: import("../user-modules/tag-group.js").TagGroupConstructor | undefined; __wechatifiedUrlLink?: import("../user-modules/url-link.js").UrlLinkConstructor | undefined; __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined; __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined; __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined; __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined; __wechatifiedWecom?: import("../user-modules/wecom.js").WecomConstructor | undefined; readonly Contact: import("../user-modules/contact.js").ContactConstructor; /** * Main bot class. * * A `Bot` is a WeChat client depends on which puppet you use. * It may equals * - web-WeChat, when you use: [puppet-puppeteer](https://github.com/wechaty/wechaty-puppet-puppeteer)/[puppet-wechat4u](https://github.com/wechaty/wechaty-puppet-wechat4u) * - ipad-WeChat, when you use: [puppet-padchat](https://github.com/wechaty/wechaty-puppet-padchat) * - ios-WeChat, when you use: puppet-ioscat * * See more: * - [What is a Puppet in Wechaty](https://github.com/wechaty/getting-started/wiki/FAQ#31-what-is-a-puppet-in-wechaty) * * > If you want to know how to send message, see [Message](#Message)
* > If you want to know how to get contact, see [Contact](#Contact) * * @example The World's Shortest ChatBot Code: 6 lines of JavaScript * import { WechatyBuilder } from 'wechaty' * const bot = WechatyBuilder.build() * bot.on('scan', (qrCode, status) => console.log('https://wechaty.js.org/qrcode/' + encodeURIComponent(qrcode))) * bot.on('login', user => console.log(`User ${user} logged in`)) * bot.on('message', message => console.log(`Message: ${message}`)) * bot.start() */ readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor; readonly Delay: import("../user-modules/delay.js").DelayConstructor; readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor; readonly Image: import("../user-modules/image.js").ImageConstructor; readonly Location: import("../user-modules/location.js").LocationConstructor; readonly Message: import("../user-modules/message.js").MessageConstructor; readonly MiniProgram: import("../user-modules/mini-program.js").MiniProgramConstructor; readonly Post: import("../user-modules/post.js").PostConstructor; readonly Room: import("../user-modules/room.js").RoomConstructor; readonly RoomInvitation: import("../user-modules/room-invitation.js").RoomInvitationConstructor; readonly Tag: import("../user-modules/tag.js").TagConstructor; readonly TagGroup: import("../user-modules/tag-group.js").TagGroupConstructor; readonly UrlLink: import("../user-modules/url-link.js").UrlLinkConstructor; readonly Channel: import("../user-modules/channel.js").ChannelConstructor; readonly Moment: import("../user-modules/moment.js").MomentConstructor; readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor; readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor; readonly Wecom: import("../user-modules/wecom.js").WecomConstructor; wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync; emitError(e: any): void; __io?: import("../io.js").Io | undefined; readonly io: import("../io.js").Io; __ioToken?: string | undefined; }) & { readonly log: import("brolog/dist/esm/src/logger.js").Loggable; }) & ((abstract new (...args: any[]) => { __puppet?: PUPPET.impls.PuppetInterface | undefined; readonly puppet: PUPPET.impls.PuppetInterface; readonly __readyState: import("state-switch/dist/esm/src/interfaces.js").StateSwitchInterface; __loginIndicator: import("state-switch/dist/esm/src/boolean-indicator.js").BooleanIndicator; __puppetMixinInited: boolean; start(): Promise; stop(): Promise; ready(): Promise; init(): Promise; __setupPuppetEvents(puppet: PUPPET.impls.PuppetInterface): void; __wechatifiedContact?: import("../user-modules/contact.js").ContactConstructor | undefined; __wechatifiedContactSelf?: import("../user-modules/contact-self.js").ContactSelfConstructor | undefined; __wechatifiedDelay?: import("../user-modules/delay.js").DelayConstructor | undefined; __wechatifiedFriendship?: import("../user-modules/friendship.js").FriendshipConstructor | undefined; __wechatifiedImage?: import("../user-modules/image.js").ImageConstructor | undefined; __wechatifiedLocation?: import("../user-modules/location.js").LocationConstructor | undefined; __wechatifiedMessage?: import("../user-modules/message.js").MessageConstructor | undefined; __wechatifiedMiniProgram?: import("../user-modules/mini-program.js").MiniProgramConstructor | undefined; __wechatifiedPost?: import("../user-modules/post.js").PostConstructor | undefined; __wechatifiedRoom?: import("../user-modules/room.js").RoomConstructor | undefined; __wechatifiedRoomInvitation?: import("../user-modules/room-invitation.js").RoomInvitationConstructor | undefined; __wechatifiedTag?: import("../user-modules/tag.js").TagConstructor | undefined; __wechatifiedTagGroup?: import("../user-modules/tag-group.js").TagGroupConstructor | undefined; __wechatifiedUrlLink?: import("../user-modules/url-link.js").UrlLinkConstructor | undefined; __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined; __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined; __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined; __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined; __wechatifiedWecom?: import("../user-modules/wecom.js").WecomConstructor | undefined; readonly Contact: import("../user-modules/contact.js").ContactConstructor; /** * Main bot class. * * A `Bot` is a WeChat client depends on which puppet you use. * It may equals * - web-WeChat, when you use: [puppet-puppeteer](https://github.com/wechaty/wechaty-puppet-puppeteer)/[puppet-wechat4u](https://github.com/wechaty/wechaty-puppet-wechat4u) * - ipad-WeChat, when you use: [puppet-padchat](https://github.com/wechaty/wechaty-puppet-padchat) * - ios-WeChat, when you use: puppet-ioscat * * See more: * - [What is a Puppet in Wechaty](https://github.com/wechaty/getting-started/wiki/FAQ#31-what-is-a-puppet-in-wechaty) * * > If you want to know how to send message, see [Message](#Message)
* > If you want to know how to get contact, see [Contact](#Contact) * * @example The World's Shortest ChatBot Code: 6 lines of JavaScript * import { WechatyBuilder } from 'wechaty' * const bot = WechatyBuilder.build() * bot.on('scan', (qrCode, status) => console.log('https://wechaty.js.org/qrcode/' + encodeURIComponent(qrcode))) * bot.on('login', user => console.log(`User ${user} logged in`)) * bot.on('message', message => console.log(`Message: ${message}`)) * bot.start() */ readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor; readonly Delay: import("../user-modules/delay.js").DelayConstructor; readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor; readonly Image: import("../user-modules/image.js").ImageConstructor; readonly Location: import("../user-modules/location.js").LocationConstructor; readonly Message: import("../user-modules/message.js").MessageConstructor; readonly MiniProgram: import("../user-modules/mini-program.js").MiniProgramConstructor; readonly Post: import("../user-modules/post.js").PostConstructor; readonly Room: import("../user-modules/room.js").RoomConstructor; readonly RoomInvitation: import("../user-modules/room-invitation.js").RoomInvitationConstructor; readonly Tag: import("../user-modules/tag.js").TagConstructor; readonly TagGroup: import("../user-modules/tag-group.js").TagGroupConstructor; readonly UrlLink: import("../user-modules/url-link.js").UrlLinkConstructor; readonly Channel: import("../user-modules/channel.js").ChannelConstructor; readonly Moment: import("../user-modules/moment.js").MomentConstructor; readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor; readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor; readonly Wecom: import("../user-modules/wecom.js").WecomConstructor; readonly log: import("brolog/dist/esm/src/logger.js").Loggable; readonly id: string; __memory?: import("memory-card").MemoryCard | undefined; readonly memory: import("memory-card").MemoryCard; __options: WechatyOptions; on(event: "error" | "ready" | "tag" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "room-announce" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "contact-tag-add" | "contact-tag-remove" | "contact-name" | "contact-alias" | "contact-phone" | "contact-description" | "contact-corporation" | "room-owner" | "tag-group" | "post-comment" | "post-tap" | "verify-code" | "dirty" | "login-url", listener: (...args: any[]) => any): any; addListener(event: E_25, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_25]): any; once(event: E_26, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_26]): any; prependListener(event: E_27, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_27]): any; prependOnceListener(event: E_28, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_28]): any; off(event: E_29, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_29]): any; removeAllListeners(event?: E_30 | undefined): any; removeListener(event: E_31, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_31]): any; emit: ((event: E_7, ...args: import("typed-emitter").Arguments) => boolean) & ((event: any, ...args: any) => boolean); eventNames(): (string | symbol)[]; rawListeners(event: E_8): Function[]; listeners(event: E_9): Function[]; listenerCount(event: E_10): number; getMaxListeners(): number; setMaxListeners(maxListeners: number): any; __events: import("../schemas/wechaty-events.js").WechatyEventListeners; wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync; emitError(e: any): void; __io?: import("../io.js").Io | undefined; readonly io: import("../io.js").Io; __ioToken?: string | undefined; }) & { readonly log: import("brolog/dist/esm/src/logger.js").Loggable; }) & ((abstract new (...args: any[]) => { __io?: import("../io.js").Io | undefined; readonly io: import("../io.js").Io; __ioToken?: string | undefined; start(): Promise; stop(): Promise; readonly log: import("brolog/dist/esm/src/logger.js").Loggable; readonly id: string; __memory?: import("memory-card").MemoryCard | undefined; readonly memory: import("memory-card").MemoryCard; __options: WechatyOptions; init(): Promise; on(event: "error" | "ready" | "tag" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "room-announce" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "contact-tag-add" | "contact-tag-remove" | "contact-name" | "contact-alias" | "contact-phone" | "contact-description" | "contact-corporation" | "room-owner" | "tag-group" | "post-comment" | "post-tap" | "verify-code" | "dirty" | "login-url", listener: (...args: any[]) => any): any; addListener(event: E_32, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_32]): any; once(event: E_33, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_33]): any; prependListener(event: E_34, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_34]): any; prependOnceListener(event: E_35, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_35]): any; off(event: E_36, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_36]): any; removeAllListeners(event?: E_37 | undefined): any; removeListener(event: E_38, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_38]): any; emit: ((event: E_7, ...args: import("typed-emitter").Arguments) => boolean) & ((event: any, ...args: any) => boolean); eventNames(): (string | symbol)[]; rawListeners(event: E_8): Function[]; listeners(event: E_9): Function[]; listenerCount(event: E_10): number; getMaxListeners(): number; setMaxListeners(maxListeners: number): any; __events: import("../schemas/wechaty-events.js").WechatyEventListeners; wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync; emitError(e: any): void; }) & { readonly log: import("brolog/dist/esm/src/logger.js").Loggable; }) & ((abstract new (...args: any[]) => { __wechatifiedContact?: import("../user-modules/contact.js").ContactConstructor | undefined; __wechatifiedContactSelf?: import("../user-modules/contact-self.js").ContactSelfConstructor | undefined; __wechatifiedDelay?: import("../user-modules/delay.js").DelayConstructor | undefined; __wechatifiedFriendship?: import("../user-modules/friendship.js").FriendshipConstructor | undefined; __wechatifiedImage?: import("../user-modules/image.js").ImageConstructor | undefined; __wechatifiedLocation?: import("../user-modules/location.js").LocationConstructor | undefined; __wechatifiedMessage?: import("../user-modules/message.js").MessageConstructor | undefined; __wechatifiedMiniProgram?: import("../user-modules/mini-program.js").MiniProgramConstructor | undefined; __wechatifiedPost?: import("../user-modules/post.js").PostConstructor | undefined; __wechatifiedRoom?: import("../user-modules/room.js").RoomConstructor | undefined; __wechatifiedRoomInvitation?: import("../user-modules/room-invitation.js").RoomInvitationConstructor | undefined; __wechatifiedTag?: import("../user-modules/tag.js").TagConstructor | undefined; __wechatifiedTagGroup?: import("../user-modules/tag-group.js").TagGroupConstructor | undefined; __wechatifiedUrlLink?: import("../user-modules/url-link.js").UrlLinkConstructor | undefined; __wechatifiedChannel?: import("../user-modules/channel.js").ChannelConstructor | undefined; __wechatifiedMoment?: import("../user-modules/moment.js").MomentConstructor | undefined; __wechatifiedCallRecord?: import("../user-modules/call.js").CallRecordConstructor | undefined; __wechatifiedChatHistory?: import("../user-modules/chat-history.js").ChatHistoryConstructor | undefined; __wechatifiedWecom?: import("../user-modules/wecom.js").WecomConstructor | undefined; readonly Contact: import("../user-modules/contact.js").ContactConstructor; /** * Main bot class. * * A `Bot` is a WeChat client depends on which puppet you use. * It may equals * - web-WeChat, when you use: [puppet-puppeteer](https://github.com/wechaty/wechaty-puppet-puppeteer)/[puppet-wechat4u](https://github.com/wechaty/wechaty-puppet-wechat4u) * - ipad-WeChat, when you use: [puppet-padchat](https://github.com/wechaty/wechaty-puppet-padchat) * - ios-WeChat, when you use: puppet-ioscat * * See more: * - [What is a Puppet in Wechaty](https://github.com/wechaty/getting-started/wiki/FAQ#31-what-is-a-puppet-in-wechaty) * * > If you want to know how to send message, see [Message](#Message)
* > If you want to know how to get contact, see [Contact](#Contact) * * @example The World's Shortest ChatBot Code: 6 lines of JavaScript * import { WechatyBuilder } from 'wechaty' * const bot = WechatyBuilder.build() * bot.on('scan', (qrCode, status) => console.log('https://wechaty.js.org/qrcode/' + encodeURIComponent(qrcode))) * bot.on('login', user => console.log(`User ${user} logged in`)) * bot.on('message', message => console.log(`Message: ${message}`)) * bot.start() */ readonly ContactSelf: import("../user-modules/contact-self.js").ContactSelfConstructor; readonly Delay: import("../user-modules/delay.js").DelayConstructor; readonly Friendship: import("../user-modules/friendship.js").FriendshipConstructor; readonly Image: import("../user-modules/image.js").ImageConstructor; readonly Location: import("../user-modules/location.js").LocationConstructor; readonly Message: import("../user-modules/message.js").MessageConstructor; readonly MiniProgram: import("../user-modules/mini-program.js").MiniProgramConstructor; readonly Post: import("../user-modules/post.js").PostConstructor; readonly Room: import("../user-modules/room.js").RoomConstructor; readonly RoomInvitation: import("../user-modules/room-invitation.js").RoomInvitationConstructor; readonly Tag: import("../user-modules/tag.js").TagConstructor; readonly TagGroup: import("../user-modules/tag-group.js").TagGroupConstructor; readonly UrlLink: import("../user-modules/url-link.js").UrlLinkConstructor; readonly Channel: import("../user-modules/channel.js").ChannelConstructor; readonly Moment: import("../user-modules/moment.js").MomentConstructor; readonly CallRecord: import("../user-modules/call.js").CallRecordConstructor; readonly ChatHistory: import("../user-modules/chat-history.js").ChatHistoryConstructor; readonly Wecom: import("../user-modules/wecom.js").WecomConstructor; init(): Promise; readonly log: import("brolog/dist/esm/src/logger.js").Loggable; readonly id: string; __memory?: import("memory-card").MemoryCard | undefined; readonly memory: import("memory-card").MemoryCard; __options: WechatyOptions; start(): Promise; stop(): Promise; on(event: "error" | "ready" | "tag" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "room-announce" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "contact-tag-add" | "contact-tag-remove" | "contact-name" | "contact-alias" | "contact-phone" | "contact-description" | "contact-corporation" | "room-owner" | "tag-group" | "post-comment" | "post-tap" | "verify-code" | "dirty" | "login-url", listener: (...args: any[]) => any): any; addListener(event: E_39, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_39]): any; once(event: E_40, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_40]): any; prependListener(event: E_41, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_41]): any; prependOnceListener(event: E_42, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_42]): any; off(event: E_43, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_43]): any; removeAllListeners(event?: E_44 | undefined): any; removeListener(event: E_45, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_45]): any; emit(event: E_7, ...args: import("typed-emitter").Arguments): boolean; eventNames(): (string | symbol)[]; rawListeners(event: E_8): Function[]; listeners(event: E_9): Function[]; listenerCount(event: E_10): number; getMaxListeners(): number; setMaxListeners(maxListeners: number): any; __events: import("../schemas/wechaty-events.js").WechatyEventListeners; }) & { readonly log: import("brolog/dist/esm/src/logger.js").Loggable; }) & ((abstract new (...args: any[]) => { wrapAsync: import("gerror/dist/esm/src/wrap-async-error/wrap-async-error.js").WrapAsync; emitError(e: any): void; emit(event: any, ...args: any): boolean; readonly log: import("brolog/dist/esm/src/logger.js").Loggable; readonly id: string; __memory?: import("memory-card").MemoryCard | undefined; readonly memory: import("memory-card").MemoryCard; __options: WechatyOptions; init(): Promise; start(): Promise; stop(): Promise; on(event: "error" | "ready" | "tag" | "login" | "start" | "stop" | "logout" | "room-invite" | "room-join" | "room-leave" | "room-topic" | "room-announce" | "dong" | "friendship" | "heartbeat" | "message" | "post" | "puppet" | "scan" | "contact-tag-add" | "contact-tag-remove" | "contact-name" | "contact-alias" | "contact-phone" | "contact-description" | "contact-corporation" | "room-owner" | "tag-group" | "post-comment" | "post-tap" | "verify-code" | "dirty" | "login-url", listener: (...args: any[]) => any): any; addListener(event: E_46, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_46]): any; once(event: E_47, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_47]): any; prependListener(event: E_48, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_48]): any; prependOnceListener(event: E_49, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_49]): any; off(event: E_50, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_50]): any; removeAllListeners(event?: E_51 | undefined): any; removeListener(event: E_52, listener: import("../schemas/wechaty-events.js").WechatyEventListeners[E_52]): any; eventNames(): (string | symbol)[]; rawListeners(event: E_8): Function[]; listeners(event: E_9): Function[]; listenerCount(event: E_10): number; getMaxListeners(): number; setMaxListeners(maxListeners: number): any; __events: import("../schemas/wechaty-events.js").WechatyEventListeners; }) & { readonly log: import("brolog/dist/esm/src/logger.js").Loggable; }) & typeof WechatySkeleton; /** * Huan(2021211): Keep the below call back hell * because it's easy for testing * especially when there's some typing mismatch and we need to figure it out. */ /** * Main bot class. * * A `Bot` is a WeChat client depends on which puppet you use. * It may equals * - web-WeChat, when you use: [puppet-puppeteer](https://github.com/wechaty/wechaty-puppet-puppeteer)/[puppet-wechat4u](https://github.com/wechaty/wechaty-puppet-wechat4u) * - ipad-WeChat, when you use: [puppet-padchat](https://github.com/wechaty/wechaty-puppet-padchat) * - ios-WeChat, when you use: puppet-ioscat * * See more: * - [What is a Puppet in Wechaty](https://github.com/wechaty/getting-started/wiki/FAQ#31-what-is-a-puppet-in-wechaty) * * > If you want to know how to send message, see [Message](#Message)
* > If you want to know how to get contact, see [Contact](#Contact) * * @example The World's Shortest ChatBot Code: 6 lines of JavaScript * import { WechatyBuilder } from 'wechaty' * const bot = WechatyBuilder.build() * bot.on('scan', (qrCode, status) => console.log('https://wechaty.js.org/qrcode/' + encodeURIComponent(qrcode))) * bot.on('login', user => console.log(`User ${user} logged in`)) * bot.on('message', message => console.log(`Message: ${message}`)) * bot.start() */ declare class WechatyBase extends mixinBase implements SayableSayer { __options: WechatyOptions; static readonly VERSION: string; readonly wechaty: WechatyInterface; readonly _stopCallbackList: (() => void)[]; /** * The term [Puppet](https://wechaty.js.org/docs/specs/puppet) in Wechaty is an Abstract Class for implementing protocol plugins. * The plugins are the component that helps Wechaty to control the WeChat(that's the reason we call it puppet). * The plugins are named XXXPuppet, for example: * - [PuppetWeChat](https://github.com/wechaty/puppet-wechat): * - [PuppetWeChat](https://github.com/wechaty/puppet-service): * - [PuppetXP](https://github.com/wechaty/puppet-xp) * * @typedef PuppetModuleName * @property {string} PUPPET_DEFAULT * The default puppet. * @property {string} wechaty-puppet-wechat4u * The default puppet, using the [wechat4u](https://github.com/nodeWechat/wechat4u) to control the [WeChat Web API](https://wx.qq.com/) via a chrome browser. * @property {string} wechaty-puppet-service * - Using the gRPC protocol to connect with a Protocol Server for controlling the any protocol of any IM program. * @property {string} wechaty-puppet-wechat * - Using the [google puppeteer](https://github.com/GoogleChrome/puppeteer) to control the [WeChat Web API](https://wx.qq.com/) via a chrome browser. * @property {string} wechaty-puppet-mock * - Using the mock data to mock wechat operation, just for test. */ /** * The option parameter to create a wechaty instance * * @typedef WechatyOptions * @property {string} name -Wechaty Name.
* When you set this:
* `new Wechaty({name: 'wechaty-name'}) `
* it will generate a file called `wechaty-name.memory-card.json`.
* This file stores the login information for bot.
* If the file is valid, the bot can auto login so you don't need to scan the qrCode to login again.
* Also, you can set the environment variable for `WECHATY_NAME` to set this value when you start.
* eg: `WECHATY_NAME="your-cute-bot-name" node bot.js` * @property {PuppetModuleName | Puppet} puppet -Puppet name or instance * @property {Partial} puppetOptions -Puppet TOKEN * @property {string} ioToken -Io TOKEN */ /** * Creates an instance of Wechaty. * @param {WechatyOptions} [options={}] * */ constructor(__options?: WechatyOptions); start(): Promise; onStart(): Promise; onStop(): Promise; /** * Send message to currentUser, in other words, bot send message to itself. * > Tips: * This function is depending on the Puppet Implementation, see [puppet-compatible-table](https://github.com/wechaty/wechaty/wiki/Puppet#3-puppet-compatible-table) * * @param {(string | Contact | FileBox | UrlLink | MiniProgram | Location | Channel)} sayable * send text, Contact, or file to bot.
* You can use {@link https://www.npmjs.com/package/file-box|FileBox} to send file * * @returns {Promise} * * @example * const bot = new Wechaty() * await bot.start() * // after logged in * * // 1. send text to bot itself * await bot.say('hello!') * * // 2. send Contact to bot itself * const contact = await bot.Contact.find() * await bot.say(contact) * * // 3. send Image to bot itself from remote url * import { FileBox } from 'wechaty' * const fileBox = FileBox.fromUrl('https://wechaty.github.io/wechaty/images/bot-qr-code.png') * await bot.say(fileBox) * * // 4. send Image to bot itself from local file * import { FileBox } from 'wechaty' * const fileBox = FileBox.fromFile('/tmp/text.jpg') * await bot.say(fileBox) * * // 5. send Link to bot itself * const linkPayload = new UrlLink ({ * description : 'WeChat Bot SDK for Individual Account, Powered by TypeScript, Docker, and Love', * thumbnailUrl: 'https://avatars0.githubusercontent.com/u/25162437?s=200&v=4', * title : 'Welcome to Wechaty', * url : 'https://github.com/wechaty/wechaty', * }) * await bot.say(linkPayload) * * // 6. send MiniProgram to bot itself * const miniPayload = new MiniProgram ({ * username : 'gh_xxxxxxx', //get from mp.weixin.qq.com * appid : '', //optional, get from mp.weixin.qq.com * title : '', //optional * pagepath : '', //optional * description : '', //optional * thumbnailurl : '', //optional * }) * await bot.say(miniPayload) */ say(sayable: Sayable): Promise; publish(post: PostInterface): Promise; unpublish(post: PostInterface): Promise; enterVerifyCode(id: string, code: string): Promise; cancelVerifyCode(id: string): Promise; refreshQrCode(): Promise; } declare type WechatyBaseProtectedProperty = '__serviceCtlLogger' | '__serviceCtlResettingIndicator' | 'wechaty' | 'onStart' | 'onStop'; export type { WechatyBaseProtectedProperty, }; export { WechatyBase, }; //# sourceMappingURL=wechaty-base.d.ts.map