parent
075d733e64
commit
dc9551c9b7
@ -0,0 +1,8 @@ |
||||
const mongoose = require('mongoose'); |
||||
|
||||
const LR = new mongoose.Schema({ |
||||
gid: {type: String, unique: true}, |
||||
roles: {type: Object, default: {}} |
||||
}); |
||||
|
||||
module.exports = mongoose.model('levelroles', LR); |
@ -0,0 +1,9 @@ |
||||
const LR = require('../../models/levelroles'); |
||||
|
||||
module.exports = async client => { |
||||
client.misc.cache.lxp.hasLevelRoles = []; |
||||
|
||||
for await (const lr of LR.find()) { |
||||
client.misc.cache.lxp.hasLevelRoles.push(lr.gid); |
||||
} |
||||
}; |
Loading…
Reference in new issue