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/monit.js

15 lines
416 B

4 years ago
const Monitor = require('../../models/monitor');
module.exports = async client => {
client.misc.cache.monit = {};
client.misc.cache.monitEnabled = [];
4 years ago
for await (const tm of Monitor.find()) {
client.misc.cache.monit[tm.gid] = {
messages: tm.messages,
voice: tm.voice,
expiry: new Date()
4 years ago
};
client.misc.cache.monitEnabled.push(tm.gid);
4 years ago
}
}