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

14 lines
399 B

const Discord = require('discord.js');
const AniData = require('../../models/anime');
module.exports = async client => {
client.misc.cache.anime = new Discord.Collection();
for await (const ani of AniData.find()) {
if (ani.queued !== true) {
client.misc.cache.anime.set(ani.japname, ani.id);
client.misc.cache.anime.set(ani.name, ani.id);
}
}
}