From d2925a3aa911936485251d6aa377585ccacecf6a Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Mon, 8 May 2023 02:42:58 +0200 Subject: [PATCH] Create dm channel when sending message in dm channel if there is no dm channel --- src/execution.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/execution.ts b/src/execution.ts index f8450cd..66be083 100644 --- a/src/execution.ts +++ b/src/execution.ts @@ -68,6 +68,7 @@ export async function queueRequest(request: DiscordApi.Message | DiscordApi.Inte if (userLimit !== false && userLimit.remaining <= 0) { if (request instanceof DiscordApi.Message) { request.react("🛑"); + if (!request.author.dmChannel) await request.author.createDM(); request.author.dmChannel?.send({ embeds: [{ color: 0xff0000,