Added snowflake and experimental xp system, made logger easier to use
This commit is contained in:
parent
606c1ea1dc
commit
171253c52c
12 changed files with 137 additions and 43 deletions
|
@ -8,4 +8,14 @@ const guildSchema = new mongoose.Schema({
|
|||
prefix: String
|
||||
});
|
||||
const Guild = mongoose.model("Guild", guildSchema);
|
||||
module.exports = Guild;
|
||||
/*const membersSchema = new mongoose.Schema({
|
||||
|
||||
});*/
|
||||
const xpSchema = new mongoose.Schema({
|
||||
id: String,
|
||||
members: Map,
|
||||
enabled: Boolean
|
||||
});
|
||||
const XP = mongoose.model("XP", xpSchema);
|
||||
exports.guilds = Guild;
|
||||
exports.xp = XP;
|
|
@ -9,7 +9,7 @@ const logger = winston.createLogger({
|
|||
format: winston.format.printf(log => `[${moment().format("YYYY-MM-DD HH:mm:ss")}]: [${log.level.toUpperCase()}] - ${log.message}`)
|
||||
});
|
||||
|
||||
exports.log = (type = "info", content) => logger.log(type, content);
|
||||
exports.log = (type, content) => content ? logger.log(type, content) : logger.log("info", content);
|
||||
|
||||
exports.error = (...args) => this.log("error", ...args);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue