ignored linting
diff --git a/src/utils/database.ts b/src/utils/database.ts
index 5d86275..b6864b8 100644
--- a/src/utils/database.ts
+++ b/src/utils/database.ts
@@ -804,10 +804,10 @@
return this.premium.updateOne({ user: user }, { $addToSet: { appliesTo: guild } }, { upsert: true });
}
- removePremium(user: string, guild: string) {
+ async removePremium(user: string, guild: string) {
// console.log("Premium removePremium");
this.cache.set(guild, [false, "", 0, false, new Date(Date.now() + this.cacheTimeout)]);
- return this.premium.updateOne({ user: user }, { $pull: { appliesTo: guild } });
+ return await this.premium.updateOne({ user: user }, { $pull: { appliesTo: guild } });
}
}
diff --git a/src/utils/migration/migration.ts b/src/utils/migration/migration.ts
index 215c7d6..0f54724 100644
--- a/src/utils/migration/migration.ts
+++ b/src/utils/migration/migration.ts
@@ -12,7 +12,7 @@
rsmData = JSON.parse(fs.readFileSync(`${dir}/${file}`, 'utf8'));
} catch { continue }
if (!rsmData.version || rsmData.version < 3) continue;
- const nucleusData = await client.database.guilds.read(rsmData.guild_info.id)
+ const nucleusData = await client.database.guilds.readOld(rsmData.guild_info.id)
const rsmToNucleus = {
id: rsmData.guild_info.id,
version: 1,
@@ -74,6 +74,6 @@
// console.log(rsmToNucleus)
const merged = _.merge(nucleusData, rsmToNucleus);
// console.log(merged)
- await client.database.guilds.write(merged.id, merged);
+ await client.database.guilds.write(merged.id!, merged);
}