From 782073c203e30201b437edd2c1fa18baf1c90a63 Mon Sep 17 00:00:00 2001 From: TheEssem Date: Thu, 5 Mar 2020 14:42:32 -0600 Subject: [PATCH] Fixed issue with warns not properly registering --- events/ready.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/events/ready.js b/events/ready.js index 4a4a77a..8695ee3 100644 --- a/events/ready.js +++ b/events/ready.js @@ -24,8 +24,7 @@ module.exports = async () => { warns: {} }); await newGuild.save(); - } - if (!guildDB.warns) { + } else if (guildDB && !guildDB.warns) { logger.log(`Creating warn object for guild ${id}...`); guildDB.set("warns", {}); await guildDB.save();