You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Natsuki/util/cache/lxp.js

12 lines
440 B

4 years ago
const LXP = require('../../models/localxp');
module.exports = async client => {
client.misc.cache.lxp.enabled = [];
client.misc.cache.lxp.disabledChannels = new Map();
3 years ago
client.misc.cache.chests.enabled = new Map();
4 years ago
for await (const xp of LXP.find()) {
client.misc.cache.lxp.enabled.push(xp.gid);
if (xp.noGains && xp.noGains.length) {client.misc.cache.lxp.disabledChannels.set(xp.gid, xp.noGains);}
4 years ago
}
};