|
|
@ -4,11 +4,13 @@ const AniData = require('../../models/anime'); |
|
|
|
|
|
|
|
|
|
|
|
module.exports = async client => { |
|
|
|
module.exports = async client => { |
|
|
|
client.misc.cache.anime = new Discord.Collection(); |
|
|
|
client.misc.cache.anime = new Discord.Collection(); |
|
|
|
|
|
|
|
client.misc.cache.animeID = new Discord.Collection(); |
|
|
|
|
|
|
|
|
|
|
|
for await (const ani of AniData.find()) { |
|
|
|
for await (const ani of AniData.find()) { |
|
|
|
if (ani.queued !== true) { |
|
|
|
if (ani.queued !== true) { |
|
|
|
client.misc.cache.anime.set(ani.japname, ani.id); |
|
|
|
client.misc.cache.anime.set(ani.japname, ani.id); |
|
|
|
client.misc.cache.anime.set(ani.name, ani.id); |
|
|
|
client.misc.cache.anime.set(ani.name, ani.id); |
|
|
|
|
|
|
|
client.misc.cache.animeID.set(ani.id, ani.name); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |