mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 21:40:49 +02:00
Fix
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = class AkinatorCommand extends Command {
|
|||||||
async run(msg, { region }) {
|
async run(msg, { region }) {
|
||||||
const current = this.client.games.get(msg.channel.id);
|
const current = this.client.games.get(msg.channel.id);
|
||||||
if (current) return msg.reply(`Please wait until the current game of \`${current.name}\` is finished.`);
|
if (current) return msg.reply(`Please wait until the current game of \`${current.name}\` is finished.`);
|
||||||
/* try { */
|
try {
|
||||||
const aki = new Aki(region, !msg.channel.nsfw);
|
const aki = new Aki(region, !msg.channel.nsfw);
|
||||||
let ans = null;
|
let ans = null;
|
||||||
let win = false;
|
let win = false;
|
||||||
@@ -156,11 +156,9 @@ module.exports = class AkinatorCommand extends Command {
|
|||||||
if (win === 'time') return buttonPress.update('I guess your silence means I have won.', { components: [] });
|
if (win === 'time') return buttonPress.update('I guess your silence means I have won.', { components: [] });
|
||||||
if (win) return buttonPress.update('Bravo, you have defeated me.', { components: [] });
|
if (win) return buttonPress.update('Bravo, you have defeated me.', { components: [] });
|
||||||
return buttonPress.update('Guessed right one more time! I love playing with you!', { components: [] });
|
return buttonPress.update('Guessed right one more time! I love playing with you!', { components: [] });
|
||||||
/*
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.client.games.delete(msg.channel.id);
|
this.client.games.delete(msg.channel.id);
|
||||||
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
|
throw err;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user