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