|
|
|
@ -4,8 +4,12 @@ const CharData = require('../../models/char'); |
|
|
|
|
|
|
|
|
|
module.exports = async client => { |
|
|
|
|
client.misc.cache.chars = new Discord.Collection(); |
|
|
|
|
client.misc.cache.charsID = new Discord.Collection(); |
|
|
|
|
|
|
|
|
|
for await (const char of CharData.find()) { |
|
|
|
|
if (char.queued !== true) {client.misc.cache.chars.set(char.name, char.id);} |
|
|
|
|
if (char.queued !== true) { |
|
|
|
|
client.misc.cache.chars.set(char.name, char.id); |
|
|
|
|
client.misc.cache.charsID.set(char.id, char.name); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |