mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 15:07:42 +02:00
IT WORKS
This commit is contained in:
@@ -105,9 +105,6 @@ module.exports = class AkinatorCommand extends Command {
|
||||
break;
|
||||
} else if (buttonPress.customId === 'false') {
|
||||
await aki.guess(false, true);
|
||||
if (aki.test) {
|
||||
await msg.channel.send({ files: [{ attachment: aki.test, name: 'test.txt' }] });
|
||||
}
|
||||
guessedLastTurn = true;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -96,14 +96,13 @@ class Akinator {
|
||||
params.append('session', this.session);
|
||||
params.append('signature', this.signature);
|
||||
params.append('forward_answer', '1');
|
||||
const { body, text } = await request
|
||||
const { body } = await request
|
||||
.post(`https://${this.region}.akinator.com/exclude`)
|
||||
.send(params.toString(), true)
|
||||
.set({
|
||||
'Content-Length': params.toString().length,
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||
});
|
||||
this.test = Buffer.from(text);
|
||||
this.guessed = null;
|
||||
this.stepLastProposition = body.step;
|
||||
this.progress = body.progression;
|
||||
|
||||
Reference in New Issue
Block a user