i hate this, fix attachment sending in dms by tricking dd into doing it right
This commit is contained in:
parent
65fc9e56de
commit
3146f2bc96
|
@ -194,14 +194,18 @@ As anyone with the Web View link can view the roll, Web View is disabled by defa
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// HOTFIX: makes discordeno actually be able to reply to any message (user or bot) while in dms
|
||||||
|
newMsg.guildId = 1n;
|
||||||
if (pubAttachments.map((file) => file.blob.size).reduce(basicReducer, 0) < config.maxFileSize) {
|
if (pubAttachments.map((file) => file.blob.size).reduce(basicReducer, 0) < config.maxFileSize) {
|
||||||
// All attachments will fit in one message
|
// All attachments will fit in one message
|
||||||
newMsg
|
newMsg &&
|
||||||
.reply({
|
newMsg
|
||||||
embeds: respMessage,
|
.reply({
|
||||||
file: pubAttachments,
|
embeds: respMessage,
|
||||||
})
|
file: pubAttachments,
|
||||||
.then((attachmentMsg) => toggleWebView(attachmentMsg, getUserIdForEmbed(rollRequest).toString(), false));
|
})
|
||||||
|
.then((attachmentMsg) => toggleWebView(attachmentMsg, getUserIdForEmbed(rollRequest).toString(), false))
|
||||||
|
.catch((e) => console.log(e));
|
||||||
} else {
|
} else {
|
||||||
pubAttachments.forEach((file) => {
|
pubAttachments.forEach((file) => {
|
||||||
newMsg &&
|
newMsg &&
|
||||||
|
@ -210,7 +214,8 @@ As anyone with the Web View link can view the roll, Web View is disabled by defa
|
||||||
embeds: respMessage,
|
embeds: respMessage,
|
||||||
file,
|
file,
|
||||||
})
|
})
|
||||||
.then((attachmentMsg) => toggleWebView(attachmentMsg, getUserIdForEmbed(rollRequest).toString(), false));
|
.then((attachmentMsg) => toggleWebView(attachmentMsg, getUserIdForEmbed(rollRequest).toString(), false))
|
||||||
|
.catch((e) => console.log(e));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue