From 80c12e0456d1c283677943e985a8fd5faa379e8f Mon Sep 17 00:00:00 2001 From: 1computer1 Date: Thu, 16 May 2019 22:52:15 -0400 Subject: [PATCH] Fix count not being incremented --- src/struct/LanguageHandler.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/struct/LanguageHandler.js b/src/struct/LanguageHandler.js index 3845fa3..809e181 100644 --- a/src/struct/LanguageHandler.js +++ b/src/struct/LanguageHandler.js @@ -85,9 +85,14 @@ class LanguageHandler extends AkairoHandler { } } + incrementCount(id) { + this.containers.get(id).count += 1; + } + async evalCode({ language, code, options }) { const { id = language.id, env = {} } = language.runWith(options); const { name, count } = await this.setupContainer(id); + this.incrementCount(id); const proc = childProcess.spawn('docker', [ 'exec', `-eCOUNT=${count}`,