Rismose / shortlink-bot

A discord bot to reveal what's behind the shortlink.
https://discord.com/oauth2/authorize?client_id=820713791884361768&scope=bot&permissions=8
GNU General Public License v3.0
14 stars 16 forks source link

FetchError: invalid json response body when bypassing #3

Closed Tungsten-bot-official closed 3 years ago

Tungsten-bot-official commented 3 years ago

Everything was going fine, but the bypass feature isn't working anymore, displaying this error:

UnhandledPromiseRejectionWarning: FetchError: invalid json response body at https://publisher.linkvertise.com/ reason: Unexpected token < in JSON at position 0 at D:\...\shortlink-bot-master\node_modules\node-fetch\lib\index.js:272:32 at processTicksAndRejections (internal/process/task_queues.js:97:5) (node:20380) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

I don't get why I'm facing this now, after a few days when the bot was working well. Is it some kind of rate limiting?

lem6ns commented 3 years ago

Yep, ratelimits or linkvertise manually blocking your IP. I should setup a check.

Tungsten-bot-official commented 3 years ago

Yep, ratelimits or linkvertise manually blocking your IP. I should setup a check.

A check? isn't it possible for you to setup your script so it uses tor? :)

lem6ns commented 3 years ago

Yep, ratelimits or linkvertise manually blocking your IP. I should setup a check.

A check? isn't it possible for you to setup your script so it uses tor? :)

It would require me to change how I send requests.