From 6ca62cf066ae4b9b3ca0117577214abc50427696 Mon Sep 17 00:00:00 2001 From: WubzyGD Date: Mon, 20 Dec 2021 14:06:05 -0700 Subject: [PATCH] anime qol stuff --- commands/anime/anime.js | 6 +++++- commands/anime/char.js | 6 +++++- util/anime/anisearch.js | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/commands/anime/anime.js b/commands/anime/anime.js index 0837532..9e5943a 100644 --- a/commands/anime/anime.js +++ b/commands/anime/anime.js @@ -65,7 +65,7 @@ module.exports = { let mesg = await message.author.send("I'm going to ask you some questions about the anime's info. Just reply with the answer and use good grammar and spelling and be as accurate as possible. To cancel the process, just leave the question unanswered for a few minutes and I'll let you know that the question timed out and is not longer answerable.") .catch(() => {return message.reply("Something went wrong there! Most likely, your DMs are closed.");}); - if (message.guild) {await mesg.channel.send("Check your DMs!");} + if (message.guild) {await message.channel.send("Check your DMs!");} function clearDM() {client.misc.activeDMs.delete(message.author.id);} dmch = mesg.channel; @@ -215,5 +215,9 @@ module.exports = { .then(() => {return message.channel.send("I got that submission out of here!");}) .catch(() => {return message.reply("It seems that submission wasn't deleted for some reason. \*insert head scratching*");}); } + if (['r', 'rand', 'random', 'any'].includes(args[0].toLowerCase())) { + let asr = await ans(message, client, client.misc.cache.anime.random(), -100000); + return await message.channel.send({embeds: [asr.embed]}); + } } }; diff --git a/commands/anime/char.js b/commands/anime/char.js index b8dbaaf..2689630 100644 --- a/commands/anime/char.js +++ b/commands/anime/char.js @@ -68,7 +68,7 @@ module.exports = { let mesg = await message.author.send("I'm going to ask you some questions about the character's info. Just reply with the answer and use good grammar and spelling and be as accurate as possible. To cancel the process, just leave the question unanswered for a few minutes and I'll let you know that the question timed out and is not longer answerable.") .catch(() => {return message.reply("Something went wrong there! Most likely, your DMs are closed.");}); - if (message.guild) {await mesg.channel.send("Check your DMs!");} + if (message.guild) {await message.channel.send("Check your DMs!");} function clearDM() {client.misc.activeDMs.delete(message.author.id);} dmch = mesg.channel; @@ -216,5 +216,9 @@ module.exports = { .then(() => {return message.channel.send("I got that submission out of here!");}) .catch(() => {return message.reply("It seems that submission wasn't deleted for some reason. \*insert head scratching*");}); } + if (['r', 'rand', 'random', 'any'].includes(args[0].toLowerCase())) { + let asr = await chs(message, client, client.misc.cache.chars.random(), -100000); + return await message.channel.send({embeds: [asr.embed]}); + } } }; \ No newline at end of file diff --git a/util/anime/anisearch.js b/util/anime/anisearch.js index be36b57..f3713db 100644 --- a/util/anime/anisearch.js +++ b/util/anime/anisearch.js @@ -21,7 +21,7 @@ module.exports = async (message, client, search, threshold=-10000, type='top') = .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('Other', `**Genre(s):** ${an.genres.join(", ")}\n**Tags:** ${an.tags.join(", ")}\n**Characters:** ${chs.join(", ")}\n**Stream this at:** ${an.streamAt.join(" ")}`) + .addField('Other', `**Genre(s):** ${an.genres.join(", ")}\n**Tags:** ${an.tags.join(", ")}\n**Characters:** ${chs.join(", ")}\n**Stream this at:** ${an.streamAt.join(", ")}`) .setColor("c375f0") .setImage(an.thumbnail) .setFooter('Natsuki', client.user.avatarURL())