| 619 | } |
| 620 | |
| 621 | protected wechatifyUserModules (puppet: Puppet) { |
| 622 | log.verbose('Wechaty', 'wechatifyUserModules(%s)', puppet) |
| 623 | |
| 624 | if (this.wechatifiedContactSelf) { |
| 625 | throw new Error('can not be initialized twice!') |
| 626 | } |
| 627 | |
| 628 | /** |
| 629 | * 1. Setup Wechaty User Classes |
| 630 | */ |
| 631 | this.wechatifiedContact = wechatifyContact(this) |
| 632 | this.wechatifiedContactSelf = wechatifyContactSelf(this) |
| 633 | this.wechatifiedFriendship = wechatifyFriendship(this) |
| 634 | this.wechatifiedImage = wechatifyImage(this) |
| 635 | this.wechatifiedMessage = wechatifyMessage(this) |
| 636 | this.wechatifiedMiniProgram = wechatifyMiniProgram(this) |
| 637 | this.wechatifiedRoom = wechatifyRoom(this) |
| 638 | this.wechatifiedRoomInvitation = wechatifyRoomInvitation(this) |
| 639 | this.wechatifiedTag = wechatifyTag(this) |
| 640 | this.wechatifiedUrlLink = wechatifyUrlLink(this) |
| 641 | |
| 642 | this.puppet = puppet |
| 643 | } |
| 644 | |
| 645 | /** |
| 646 | * Start the bot, return Promise. |