diff --git a/.gitignore b/.gitignore
index 63ad009..9db39fb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,8 @@ node_modules/
config.json
auth.json
test.js
-/.idea/
\ No newline at end of file
+/.idea/
+
+api/**/*
+api/
+.idea/**/*
\ No newline at end of file
diff --git a/.idea/Natsuki.iml b/.idea/Natsuki.iml
index d007bc1..0c1c525 100644
--- a/.idea/Natsuki.iml
+++ b/.idea/Natsuki.iml
@@ -5,6 +5,8 @@
+
+
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 10f9174..2e2cd56 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,10 +4,13 @@
-
-
+
+
-
+
+
+
+
@@ -64,6 +67,7 @@
@@ -85,8 +89,8 @@
-
+
diff --git a/commands/anime/char.js b/commands/anime/char.js
index 2ec5b78..c55f480 100644
--- a/commands/anime/char.js
+++ b/commands/anime/char.js
@@ -54,7 +54,7 @@ module.exports = {
if (message.attachments.size) {
if (options.thumbnail) {
if (!options.images) {options.images = [];}
- Array.from(message.attachments.keys()).forEach(i => options.images.push(i));
+ Array.from(message.attachments.keys()).forEach(i => options.images.push(message.attachments.get(i).url));
} else {
if (!options.images) {options.images = [];}
let att = Array.from(message.attachments.keys());
diff --git a/util/anime/anisearch.js b/util/anime/anisearch.js
index 6845908..9afb8d7 100644
--- a/util/anime/anisearch.js
+++ b/util/anime/anisearch.js
@@ -23,7 +23,7 @@ module.exports = async (message, client, search, threshold=-10000, type='full')
.addField('Description', an.plot)
.addField('Length', `**# of Seasons:** ${an.seasons}\n**# of Episodes:** ${an.episodes}`)
.addField('Airing', `**Began:** ${an.airStartDate}\n**Ended:** ${an.isComplete ? an.airEndDate : 'This anime is still airing!'}`)
- .addField("Cast", `**${an.characters.length} Characters**\n${an.characters.map(char => client.misc.cache.charsID.get(char)).join(', ')}`)
+ .addField("Cast", `**${an.characters.length} Characters**\n${(an.characters.length > 50 ? an.characters.slice(0, 49) : an.characters).map(char => client.misc.cache.charsID.get(char)).join(', ')}${an.characters.length > 50 ? `\n**+${an.characters.length - 50} Others**` : ''}`)
.addField('Other', `**Genre(s):** ${an.genres.join(", ")}\n**Tags:** ${an.tags.join(", ")}\n**Stream this at:** ${an.streamAt.join(", ")}${an.altNames && an.altNames.length ? `\n\n**Other names:** ${an.altNames.map(n => `\`${n}\``).join(', ')}` : ''}`)
.addField('Love', `**Watchers**: **${an.watchers} Natsuki ${client.utils.as(an.watchers, 'user')}** have this anime on their list of finished anime!\n\`n?watched ${an.name}\``)
}
diff --git a/util/anime/charsearch.js b/util/anime/charsearch.js
index 43b293f..582addf 100644
--- a/util/anime/charsearch.js
+++ b/util/anime/charsearch.js
@@ -13,6 +13,7 @@ module.exports = async (message, client, search, threshold=-10000, type='full')
let cch = char.anime ? char : await Char.findOne({id: client.misc.cache.chars.get(char)});
let ani = await Ani.findOne({id: cch.anime});
let forceAni = false; if (!ani) {forceAni = true;}
+ //console.log(cch.images, cch.thumbnail);
cch.images.push(cch.thumbnail);
let rte = new Discord.MessageEmbed()
.setTitle(cch.name)
diff --git a/util/cache/char.js b/util/cache/char.js
index 367030d..0773052 100644
--- a/util/cache/char.js
+++ b/util/cache/char.js
@@ -20,6 +20,11 @@ module.exports = async (client, spinner) => {
client.misc.cache.charsID.set(char.id, char.name);
client.misc.cache.charsNum++;
client.misc.cache.charsLove.set(char.id, char.loved);
+ let hasNull = false;
+ char.images.forEach((image, index) => {
+ if (image === null) {char.images.splice(index, 1); hasNull = true;}
+ });
+ if (hasNull) {char.markModified('images'); await char.save();}
spinner.update({text: `${chalk.gray('[PROC]')} >> ${chalk.blueBright(`Cached`)} ${chalk.white(`${amount}`)} ${chalk.blueBright(`characters into lookup registry.`)} ${chalk.gray(`(${client.misc.cache.chars.size} // NN)`)}`});
amount++;
}