Removed unnecessary comments, replaced instances of console.error with a throw

This commit is contained in:
TheEssem 2019-12-10 09:53:43 -06:00
parent 346312f006
commit 08ec2ca9ea
25 changed files with 37 additions and 52 deletions

View file

@ -12,8 +12,6 @@ module.exports = async () => {
for (const [id, guild] of client.guilds) {
const guildDB = (await database.guilds.find({ id: id }).exec())[0];
const xpDB = (await database.xp.find({ id: id }).exec())[0];
// .length === 0 && guildDB.constructor === Object
// !Object.entries(guildDB)
if (!guildDB) {
console.log(`Registering guild database entry for guild ${id}...`);
const newGuild = new database.guilds({
@ -23,8 +21,6 @@ module.exports = async () => {
});
await newGuild.save();
}
// .length === 0 && xpDB.constructor === Object
// !Object.entries(xpDB)
if (!xpDB) {
console.log(`Registering xp database entry for guild ${id}...`);
const memberInfo = {};