From 0a5a95aa0598a0bcf4a46f70b21e7a165d494a28 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Sun, 9 Oct 2022 19:33:44 -0600 Subject: [PATCH] commandDispatcher: actually rename the props --- src/lib/commandDispatcher.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/commandDispatcher.js b/src/lib/commandDispatcher.js index 68e0702..a156d60 100644 --- a/src/lib/commandDispatcher.js +++ b/src/lib/commandDispatcher.js @@ -87,9 +87,12 @@ async function CommandDispatcher(msg) { const response = await runCommand(msg, cmd, line, args); if (response != null) { if (response.file) { - const files = response.files ?? []; - files.push(response.file); + const newFile = response.file; delete response.file; + newFile.contents = newFile.file; + delete newFile.file; + const files = response.files ?? []; + files.push(newFile); response.files = files; } if (response.embed) {