From 8e5f699290428df20c248efcbd517737532b3ba4 Mon Sep 17 00:00:00 2001 From: Huan LI Date: Wed, 1 Aug 2018 01:17:24 +0800 Subject: [PATCH] code clean --- src/wechaty.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wechaty.ts b/src/wechaty.ts index 933758a2..8a234e11 100644 --- a/src/wechaty.ts +++ b/src/wechaty.ts @@ -102,6 +102,8 @@ export interface WechatyOptions { ioToken? : string, // Io TOKEN } +const PUPPET_MEMORY_NAME = 'puppet' + /** * Main bot class. * @@ -548,7 +550,7 @@ export class Wechaty extends Accessory implements Sayable { } const puppet = this.options.puppet || config.systemPuppetName() - const puppetMemory = this.memory.sub('puppet') + const puppetMemory = this.memory.sub(PUPPET_MEMORY_NAME) const puppetInstance = await PuppetManager.resolve({ puppet, -- GitLab