From e4a5f48a31ed229d70769ffd628df3b5bf8eacb5 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Wed, 28 Apr 2021 09:10:46 -0500 Subject: [PATCH] Return if no guild resolved when looking for prefix in db --- bot.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot.js b/bot.js index 7f06e4f..854a835 100644 --- a/bot.js +++ b/bot.js @@ -57,6 +57,10 @@ client.on("message", async message => { console.error; } let prefix; + if (!result) { + console.log(`Guild ${message.guild.id} not in database`); + return; + } if (result.prefix) { prefix = result.prefix; } else {