mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-11 15:57:50 +02:00
Fix Akinator
This commit is contained in:
@@ -45,8 +45,11 @@ module.exports = class AkinatorCommand extends Command {
|
|||||||
ans = answers.indexOf(msgs.first().content.toLowerCase());
|
ans = answers.indexOf(msgs.first().content.toLowerCase());
|
||||||
}
|
}
|
||||||
const guess = await this.guess(msg.channel);
|
const guess = await this.guess(msg.channel);
|
||||||
if (guess === 0) return msg.say('I don\'t have any guesses. Bravo.');
|
if (!guess) {
|
||||||
if (!guess) return msg.reply('Hmm... I seem to be having a bit of trouble. Check back soon!');
|
this.sessions.delete(msg.channel.id);
|
||||||
|
if (guess === 0) return msg.say('I don\'t have any guesses. Bravo.');
|
||||||
|
return msg.reply('Hmm... I seem to be having a bit of trouble. Check back soon!');
|
||||||
|
}
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setColor(0xF78B26)
|
.setColor(0xF78B26)
|
||||||
.setTitle(`I'm ${Math.round(guess.proba * 100)}% sure it's...`)
|
.setTitle(`I'm ${Math.round(guess.proba * 100)}% sure it's...`)
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiao",
|
"name": "xiao",
|
||||||
"version": "95.1.8",
|
"version": "95.1.9",
|
||||||
"description": "Your personal server companion.",
|
"description": "Your personal server companion.",
|
||||||
"main": "Xiao.js",
|
"main": "Xiao.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user