|
|
|
@ -16,6 +16,7 @@ const database = mongoClient.db();
|
|
|
|
const collectionOptions = { authdb: config.mongoOptions.authSource, w: "majority" };
|
|
|
|
const collectionOptions = { authdb: config.mongoOptions.authSource, w: "majority" };
|
|
|
|
const getIV = () => crypto.randomBytes(16);
|
|
|
|
const getIV = () => crypto.randomBytes(16);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class Guilds {
|
|
|
|
export class Guilds {
|
|
|
|
guilds: Collection<GuildConfig>;
|
|
|
|
guilds: Collection<GuildConfig>;
|
|
|
|
defaultData: GuildConfig;
|
|
|
|
defaultData: GuildConfig;
|
|
|
|
@ -533,7 +534,6 @@ export class Premium {
|
|
|
|
const entry = await this.premium.findOne({ user: user });
|
|
|
|
const entry = await this.premium.findOne({ user: user });
|
|
|
|
return entry ? true : false;
|
|
|
|
return entry ? true : false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async createUser(user: string, level: number) {
|
|
|
|
async createUser(user: string, level: number) {
|
|
|
|
// console.log("Premium createUser");
|
|
|
|
// console.log("Premium createUser");
|
|
|
|
await this.premium.insertOne({ user: user, appliesTo: [], level: level }, collectionOptions);
|
|
|
|
await this.premium.insertOne({ user: user, appliesTo: [], level: level }, collectionOptions);
|
|
|
|
|