From 97206cb213c8641c94587fd6f0ff4c55d7ea5463 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Thu, 27 May 2021 16:44:31 -0600 Subject: [PATCH] commandDispatcher: fix file uploading --- src/lib/commandDispatcher.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/commandDispatcher.js b/src/lib/commandDispatcher.js index 5af8b4a..e30c4d7 100644 --- a/src/lib/commandDispatcher.js +++ b/src/lib/commandDispatcher.js @@ -83,6 +83,11 @@ async function CommandDispatcher(msg) { const response = await runCommand(msg, cmd, line, args); if (response != null) { + let file; + if (response.file) { + file = response.file; + delete response.file; + } msg.channel .createMessage( Object.assign( @@ -96,7 +101,7 @@ async function CommandDispatcher(msg) { }, } ), - response.file + file ) .catch((e) => { msg.channel.createMessage({