Fixed issue with warns not properly registering

This commit is contained in:
TheEssem 2020-03-05 14:42:32 -06:00
parent f87b1afb38
commit 782073c203

View file

@ -24,8 +24,7 @@ module.exports = async () => {
warns: {} warns: {}
}); });
await newGuild.save(); await newGuild.save();
} } else if (guildDB && !guildDB.warns) {
if (!guildDB.warns) {
logger.log(`Creating warn object for guild ${id}...`); logger.log(`Creating warn object for guild ${id}...`);
guildDB.set("warns", {}); guildDB.set("warns", {});
await guildDB.save(); await guildDB.save();