From 920300314f430156f9c0752370c7396c55b47d28 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 22 Apr 2024 16:33:24 -0400 Subject: [PATCH] Add region support --- structures/Akinator.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/structures/Akinator.js b/structures/Akinator.js index 8d6bd708..f093ca81 100644 --- a/structures/Akinator.js +++ b/structures/Akinator.js @@ -1,5 +1,5 @@ const request = require('node-superfetch'); -const regions = ['en']; +const regions = ['en', 'ar', 'cn', 'de', 'es', 'fr', 'il', 'it', 'jp', 'kr', 'nl', 'pt', 'ru', 'tr', 'id']; const answers = ['Yes', 'No', 'Don\'t know', 'Probably', 'Probably not']; class Akinator { @@ -29,6 +29,13 @@ class Akinator { this.question = text.match(/

(.+)<\/p>/)[1]; this.session = text.match(/session: '(.+)'/)[1]; this.signature = text.match(/signature: '(.+)'/)[1]; + this.answers = [ + text.match(/(.+)<\/a>/)[1], + text.match(/(.+)<\/a>/)[1], + text.match(/(.+)<\/a>/)[1], + text.match(/(.+)<\/a>/)[1], + text.match(/(.+)<\/a>/)[1] + ]; return this; }