discord.js-akinator
Advanced tools
Comparing version 3.4.4 to 3.4.5
{ | ||
"name": "discord.js-akinator", | ||
"version": "3.4.4", | ||
"version": "3.4.5", | ||
"description": "A Discord.js v13 Module that allows you to Create an Akinator Command for Your Discord Bot within Seconds of Installation.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -21,4 +21,6 @@ <h1 align="center"> | ||
- ⚡️ <b>Quick & Easy Setup</b> | This package was built with the intentions of working out-of-the-box. Only one parameter is required at least! | ||
- ⚡️ <b>Quick & Easy Setup!</b> | This package was built with the intentions of working out-of-the-box. Only one parameter is required at least! | ||
- 🤖 <b>Slash Command & Message Support!</b> | No matter how your bot receives its commands, you can simply pass in a `CommandInteraction` or `Message` and it will work! | ||
## Install Package | ||
@@ -84,2 +86,2 @@ | ||
- 👾 Found a Bug, or Inaccurate Translations? [Open an Issue](https://github.com/WillTDA/Discord.js-Akinator/issues), or Fork and [Submit a Pull Request](https://github.com/WillTDA/Discord.js-Akinator/pulls) on our [GitHub Repository](https://github.com/WillTDA/Discord.js-Akinator)! | ||
- 👾 Found a Bug, or Inaccurate Translations? [Open an Issue](https://github.com/WillTDA/Discord.js-Akinator/issues), or Fork and [Submit a Pull Request](https://github.com/WillTDA/Discord.js-Akinator/pulls) on our [GitHub Repository](https://github.com/WillTDA/Discord.js-Akinator)! |
@@ -98,5 +98,5 @@ const { Aki } = require("aki-api"); | ||
options.embedColor = Discord.Util.resolveColor(options.embedColor || "RANDOM") | ||
options.language = options.language.toLowerCase(); | ||
@@ -111,8 +111,8 @@ options.gameType = options.gameType.toLowerCase(); | ||
if (!["animal", "character", "object"].includes(options.gameType)) return console.log(`Discord.js Akinator Error: Game Type "${options.gameType}" Not Found. Choose from: "animal", "character" or "object".\nNeed Help? Join Our Discord Server at 'https://discord.gg/P2g24jp'`); | ||
try { | ||
inputData.client = input.client, | ||
inputData.guild = input.guild, | ||
inputData.author = input.author ? input.author : input.user, | ||
inputData.channel = input.channel | ||
inputData.guild = input.guild, | ||
inputData.author = input.author ? input.author : input.user, | ||
inputData.channel = input.channel | ||
} catch { | ||
@@ -168,8 +168,8 @@ return console.log("Discord.js Akinator Error: Failed to Parse Input for Use.\nJoin Our Discord Server for Support at 'https://discord.gg/P2g24jp'"); | ||
fields: [], | ||
author: { name: usertag, icon_url: avatar }, | ||
footer: { text: translations.stopTip } | ||
author: { name: usertag, icon_url: avatar } | ||
} | ||
if (!options.useButtons) { | ||
akiEmbed.fields.push({ name: translations.pleaseType, value: `**Y** or **${translations.yes}**\n**N** or **${translations.no}**\n**I** or **IDK**\n**P** or **${translations.probably}**\n**PN** or **${translations.probablyNot}**\n**B** or **${translations.back}**` }) | ||
if (!options.useButtons) { | ||
akiEmbed.footer = { text: translations.stopTip } | ||
akiEmbed.fields.push({ name: translations.pleaseType, value: `**Y** or **${translations.yes}**\n**N** or **${translations.no}**\n**I** or **IDK**\n**P** or **${translations.probably}**\n**PN** or **${translations.probablyNot}**\n**B** or **${translations.back}**` }) | ||
} | ||
@@ -203,7 +203,7 @@ | ||
fields: [ | ||
{ name: translations.ranking, value: `**#${aki.answers[0].ranking}**`, inline: true }, | ||
{ name: translations.ranking, value: `**#${aki.answers[0].ranking}**`, inline: true }, | ||
{ name: translations.noOfQuestions, value: `**${aki.currentStep}**`, inline: true } | ||
], | ||
} | ||
await akiMessage.edit({ embeds: [guessEmbed] }); | ||
@@ -238,3 +238,3 @@ akiMessage.embeds[0] = guessEmbed; | ||
} | ||
if (options.useButtons) await response.editReply({ embeds: [finishedGameCorrect], components: [] }) | ||
@@ -254,3 +254,3 @@ else await akiMessage.edit({ embeds: [finishedGameCorrect], components: [] }) | ||
} | ||
if (options.useButtons) await response.editReply({ embeds: [finishedGameDefeated], components: [] }) | ||
@@ -276,8 +276,9 @@ else await akiMessage.edit({ embeds: [finishedGameDefeated], components: [] }) | ||
fields: [], | ||
author: { name: usertag, icon_url: avatar }, | ||
footer: { text: translations.stopTip } | ||
author: { name: usertag, icon_url: avatar } | ||
} | ||
if (!options.useButtons) updatedAkiEmbed.fields.push({ name: translations.pleaseType, value: `**Y** or **${translations.yes}**\n**N** or **${translations.no}**\n**I** or **IDK**\n**P** or **${translations.probably}**\n**PN** or **${translations.probablyNot}**\n**B** or **${translations.back}**` }) | ||
if (!options.useButtons) { | ||
updatedAkiEmbed.footer = { text: translations.stopTip } | ||
updatedAkiEmbed.fields.push({ name: translations.pleaseType, value: `**Y** or **${translations.yes}**\n**N** or **${translations.no}**\n**I** or **IDK**\n**P** or **${translations.probably}**\n**PN** or **${translations.probablyNot}**\n**B** or **${translations.back}**` }) | ||
} | ||
await akiMessage.edit({ embeds: [updatedAkiEmbed] }) | ||
@@ -323,3 +324,3 @@ akiMessage.embeds[0] = updatedAkiEmbed | ||
} | ||
if (!options.useButtons) thinkingEmbed.fields.push({ name: translations.pleaseType, value: `**Y** or **${translations.yes}**\n**N** or **${translations.no}**\n**I** or **IDK**\n**P** or **${translations.probably}**\n**PN** or **${translations.probablyNot}**\n**B** or **${translations.back}**` }) | ||
@@ -344,3 +345,3 @@ | ||
} | ||
await aki.win() | ||
@@ -361,3 +362,3 @@ await akiMessage.edit({ embeds: [stopEmbed], components: [] }) | ||
else if (e == "DiscordAPIError: Cannot send an empty message") return console.log("Discord.js Akinator Error: Discord.js v13 or Higher is Required.\nNeed Help? Join Our Discord Server at 'https://discord.gg/P2g24jp'"); | ||
console.log("Discord.js Akinator Error:") | ||
@@ -364,0 +365,0 @@ throw new Error(e); |
154043
3004
85