From 473738382b5df784504c9e2506acf5eca13d1696 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 25 Aug 2018 12:05:44 +0900 Subject: [PATCH] Make server monitoring optional --- src/config.ts | 1 + src/index.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/config.ts b/src/config.ts index 7e3f632..f729155 100644 --- a/src/config.ts +++ b/src/config.ts @@ -5,6 +5,7 @@ type Config = { apiUrl: string; keywordEnabled: boolean; reversiEnabled: boolean; + serverMonitoring: boolean; mecab?: string; }; diff --git a/src/index.ts b/src/index.ts index 5219265..73990e5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,9 +32,9 @@ promiseRetry(retry => { ai.install(new EmojiModule()); ai.install(new FortuneModule()); ai.install(new GuessingGameModule()); - ai.install(new ServerModule()); ai.install(new ReversiModule()); ai.install(new TimerModule()); + if (config.serverMonitoring) ai.install(new ServerModule()); if (config.keywordEnabled) ai.install(new KeywordModule()); console.log('ai started');