From 6895018d241b09163a88c53aea9f05383eb305e8 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Sun, 13 Aug 2023 20:41:17 +0300 Subject: [PATCH] bugfix --- structure/commands/CannedReply.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/structure/commands/CannedReply.js b/structure/commands/CannedReply.js index 35c1f59..cf047dc 100644 --- a/structure/commands/CannedReply.js +++ b/structure/commands/CannedReply.js @@ -29,7 +29,7 @@ class CannedReply extends Command { const list = Object.entries(this.client.modmail.replies); let str = ''; - if (second.toLowerCase() === '-dm') channel = await message.author.createDM(); + if (second?.toLowerCase() === '-dm') channel = await message.author.createDM(); // eslint-disable-next-line no-shadow for (const [ name, content ] of list) { const substr = `**${name}:** ${content}\n`;