diff --git a/bot.py b/bot.py index 82d0c1e..4a0e713 100755 --- a/bot.py +++ b/bot.py @@ -101,8 +101,11 @@ class BotClient(discord.Client): proc = sp.run( ["node", "calc_main.js", "--"] + args, stdout=sp.PIPE, stderr=sp.PIPE ) + stderr = proc.stderr.decode() if proc.returncode != 0: raise Exception(proc.stderr.decode()) + if stderr: + _log.warning(f"running calculation '{args}': {stderr}") return proc.stdout.decode() def is_replay(self, message: discord.Message) -> bool: