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`;