From 070cc46fca1c5088f90ac5fd0f35c8b26072e865 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 27 Jul 2022 16:16:22 +0300 Subject: [PATCH] bugfix --- src/structure/components/observers/CommandHandler.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/structure/components/observers/CommandHandler.js b/src/structure/components/observers/CommandHandler.js index 4ae358e..673e3aa 100644 --- a/src/structure/components/observers/CommandHandler.js +++ b/src/structure/components/observers/CommandHandler.js @@ -34,8 +34,10 @@ class CommandHandler extends Observer { const userWrapper = await this.client.getUserWrapper(message.author.id); - const settings = await message.guildWrapper.settings(); - if (!settings.textcommands.enabled && !userWrapper.developer) return; + if (message.guild) { + const settings = await message.guildWrapper.settings(); + if (!settings.textcommands.enabled && !userWrapper.developer) return; + } if(message.guild) { if(!message.member) await message.guild.members.fetch(message.author.id);