One last ditch effort

This commit is contained in:
Daniel Odendahl Jr
2019-04-19 17:14:42 +00:00
parent 2f6b62b13b
commit 073fe8cc1c
+2 -2
View File
@@ -74,7 +74,7 @@ module.exports = class AkinatorCommand extends Command {
}
async createSession(channel) {
const time = Date.now();
let time;
const { body } = await request
.get('https://srv13.akinator.com:9196/ws/new_session')
.query({
@@ -85,7 +85,7 @@ module.exports = class AkinatorCommand extends Command {
constraint: 'ETAT<>\'AV\'',
soft_constraint: channel.nsfw ? '' : 'ETAT=\'EN\'',
question_filter: channel.nsfw ? '' : 'cat=1',
_: time
_: time = Date.now()
});
if (body.completion !== 'OK') return { data: null, raw: body };
const data = body.parameters;