mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 22:01:54 +02:00
Fix
This commit is contained in:
@@ -72,7 +72,7 @@ module.exports = class TwentyQuestionsCommand extends Command {
|
||||
this.client.games.delete(msg.channel.id);
|
||||
if (win === 'time') return msg.say('Game ended due to forfeit.');
|
||||
return msg.say(stripIndents`
|
||||
**${question.win ? 'You won!' : '20Q won!'}**
|
||||
**${question.winText}**
|
||||
${question.result}
|
||||
`);
|
||||
} catch (err) {
|
||||
@@ -130,15 +130,24 @@ module.exports = class TwentyQuestionsCommand extends Command {
|
||||
if (win === '20Q won!') {
|
||||
return {
|
||||
win: false,
|
||||
winText: win,
|
||||
result: $('big').first().children().first().text()
|
||||
};
|
||||
}
|
||||
if (win === 'You won!') {
|
||||
return {
|
||||
win: true,
|
||||
winText: win,
|
||||
result: 'I was unable to guess what you were thinking. Nice job!'
|
||||
};
|
||||
}
|
||||
if (win === 'You won, but 20Q guessed it eventually') {
|
||||
return {
|
||||
win: true,
|
||||
winText: win,
|
||||
result: $('big').first().children().first().text()
|
||||
};
|
||||
}
|
||||
const resultText = $('big').first().children().first();
|
||||
const answers = [];
|
||||
$(resultText).find('a').each((i, elem) => {
|
||||
|
||||
Reference in New Issue
Block a user