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: {}
});
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();