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({