commandDispatcher: actually rename the props

This commit is contained in:
Cynthia Foxwell 2022-10-09 19:33:44 -06:00
parent 8667189684
commit 0a5a95aa05

View file

@ -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) {