commandDispatcher: fix files for Oceanic

This commit is contained in:
Cynthia Foxwell 2022-10-09 19:32:03 -06:00
parent fba3e3d795
commit 8667189684
1 changed files with 4 additions and 4 deletions

View File

@ -86,10 +86,11 @@ async function CommandDispatcher(msg) {
msg.hasRan = true;
const response = await runCommand(msg, cmd, line, args);
if (response != null) {
let file;
if (response.file) {
file = response.file;
const files = response.files ?? [];
files.push(response.file);
delete response.file;
response.files = files;
}
if (response.embed) {
response.embeds = [...(response.embeds ?? []), response.embed];
@ -117,8 +118,7 @@ async function CommandDispatcher(msg) {
messageID: msg.id,
},
}
),
file
)
);
if (response.addReactions) {
for (const index in response.addReactions) {