Merge pull request #15 from mei23/mei-1009-config-flags

configの設定が効かなかったりするのを修正
This commit is contained in:
syuilo 2018-10-09 06:13:07 +09:00 committed by GitHub
commit 8512a8e393
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View file

@ -5,6 +5,7 @@ type Config = {
apiUrl: string;
keywordEnabled: boolean;
reversiEnabled: boolean;
serverMonitoring: boolean;
mecab?: string;
};

View file

@ -20,6 +20,8 @@ export default class ReversiModule implements IModule {
private reversiConnection?: any;
public install = (ai: ) => {
if (!config.reversiEnabled) return;
this.ai = ai;
this.reversiConnection = new ReconnectingWebSocket(`${config.wsUrl}/games/reversi?i=${config.i}`, [], {

View file

@ -20,6 +20,8 @@ export default class ServerModule implements IModule {
private statsLogs: any[] = [];
public install = (ai: ) => {
if (!config.serverMonitoring) return;
this.ai = ai;
this.connection = new ReconnectingWebSocket(`${config.wsUrl}/server-stats`, [], {