giorgi-o / SkinPeek

Awesome Valorant Discord bot to see your daily shop, night market, battlepass progression, and much more
GNU General Public License v3.0
195 stars 86 forks source link

Cannot read properties of undefined (reading 'find') #103

Closed xMasa-1022 closed 3 months ago

xMasa-1022 commented 3 months ago

So, I used /battlepass command and got this error:

 xmasa. used /battlepass
 Fetching battlepass progress for xMasa#1022...
 Fetching current valorant version...
Assertion failed: Valorant battlepass code is 400! {
  statusCode: 400,
  headers: {
    date: 'Thu, 18 Apr 2024 06:14:38 GMT',
    'content-type': 'application/json',
    'content-length': '108',
    connection: 'keep-alive',
    vary: 'Origin',
    'cf-cache-status': 'DYNAMIC',
    server: 'cloudflare',
    'cf-ray': '8762840c4b1919fc-KIX'
  },
  body: '{\n' +
    '    "httpStatus": 400,\n' +
    '    "errorCode": "INVALID_HEADERS",\n' +
    '    "message": "Bad headers used for request"\n' +
    '}'
}
 TypeError: Cannot read properties of undefined (reading 'find')
    at getBattlepassProgress (file://*/SkinPeek/valorant/battlepass.js:145:37)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async renderBattlepassProgress (file:///*/SkinPeek/valorant/battlepass.js:262:32)
    at async Client.<anonymous> (file:///*/SkinPeek/discord/bot.js:1059:37)

How can I fixed it?