From 3146f2bc96ff35ad4325532cf17c5ec324a3f4a2 Mon Sep 17 00:00:00 2001 From: Ean Milligan Date: Thu, 17 Jul 2025 02:58:31 -0400 Subject: [PATCH] i hate this, fix attachment sending in dms by tricking dd into doing it right --- .../managers/handler/workerComplete.ts | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/artigen/managers/handler/workerComplete.ts b/src/artigen/managers/handler/workerComplete.ts index 3e3a0f8..efe724d 100644 --- a/src/artigen/managers/handler/workerComplete.ts +++ b/src/artigen/managers/handler/workerComplete.ts @@ -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) { // All attachments will fit in one message - newMsg - .reply({ - embeds: respMessage, - file: pubAttachments, - }) - .then((attachmentMsg) => toggleWebView(attachmentMsg, getUserIdForEmbed(rollRequest).toString(), false)); + newMsg && + newMsg + .reply({ + embeds: respMessage, + file: pubAttachments, + }) + .then((attachmentMsg) => toggleWebView(attachmentMsg, getUserIdForEmbed(rollRequest).toString(), false)) + .catch((e) => console.log(e)); } else { pubAttachments.forEach((file) => { newMsg && @@ -210,7 +214,8 @@ As anyone with the Web View link can view the roll, Web View is disabled by defa embeds: respMessage, file, }) - .then((attachmentMsg) => toggleWebView(attachmentMsg, getUserIdForEmbed(rollRequest).toString(), false)); + .then((attachmentMsg) => toggleWebView(attachmentMsg, getUserIdForEmbed(rollRequest).toString(), false)) + .catch((e) => console.log(e)); }); } }