From d7a7e0cedc165bc35128892f92d17bf5c8e5c3ab Mon Sep 17 00:00:00 2001 From: Navy Date: Sun, 19 Apr 2020 22:53:59 +0300 Subject: [PATCH] fetch guild and user settings --- structure/client/components/observers/CommandHandler.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/structure/client/components/observers/CommandHandler.js b/structure/client/components/observers/CommandHandler.js index d9418b2..b46b343 100644 --- a/structure/client/components/observers/CommandHandler.js +++ b/structure/client/components/observers/CommandHandler.js @@ -31,10 +31,13 @@ class CommandHandler extends Observer { if(!this.client._built || message.webhookID || message.author.bot - || (message.guild && !message.guild.available)) return undefined; + || (message.guild && (!message.guild.available || message.guild.banned))) return undefined; + + await message.author.settings(); - if(message.guild && !message.member) { - await message.guild.members.fetch(message.author.id); + if (message.guild) { + await message.guild.settings(); + if (!message.member) await message.guild.members.fetch(message.author.id); } const content = message.content;