xxerick / TwitchFollowers

🟣 Twitch followers discord bot. (TwitchFarmer)
116 stars 82 forks source link

error #25

Open Sppsupphack opened 1 year ago

Sppsupphack commented 1 year ago
                            return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
                                                       ^

FetchError: invalid json response body at https://api.twitch.tv/kraken/users?login=dadadawds12e reason: Unexpected token G in JSON at position 0 at C:\Users\ioumi\OneDrive\Desktop\TwitchFollowers-main\node_modules\node-fetch\lib\index.js:273:32 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Client. (C:\Users\ioumi\OneDrive\Desktop\TwitchFollowers-main\index.js:119:13) { type: 'invalid-json' }

Node.js v18.15.0

larinspub commented 1 year ago

+1

BloxerExists commented 1 year ago

they changed kraken to helix

BloxerExists commented 1 year ago

So just change https://api.twitch.tv/kraken/users?login=${username} to https://api.twitch.tv/helix/users?login=${username}

yoyosingh123 commented 1 year ago

So just change https://api.twitch.tv/kraken/users?login=${username} to https://api.twitch.tv/helix/users?login=${username}

So I changed that but now I get this error please help how do I fix it?

image