diff --git a/lib/common/common.js b/lib/common/common.js index 2383242..09a4fbd 100644 --- a/lib/common/common.js +++ b/lib/common/common.js @@ -317,11 +317,9 @@ export default new class newCommon { */ getck (data, bot = Bot, transformation) { let cookie = bot.cookies[data] - let ck = {} - cookie.split('; ').forEach(keyValue => { - const [key, value] = keyValue.split('=') - ck[key] = value - }) + let ck = cookie.replace(/=/g, '":"').replace(/;/g, '","').replace(/ /g, '').trim() + ck = ck.substring(0, ck.length - 2) + ck = JSON.parse('{"'.concat(ck).concat('}')) if (transformation) { let arr = [] for (let i in ck) {