extiverse / bot

The @flagrow bot.
7 stars 0 forks source link

MaxRetriesPerRequestError: Reached the max retries per request limit (which is 20). Refer to "maxRetriesPerRequest" option for details. - Stock git pull #8

Closed Debaucus closed 8 months ago

Debaucus commented 3 years ago

Not sure if you would prefer me posting in here or on discord, but seemed a bit niche/off topic for flarum discord chat itself. And I know you guys are busy :D

I git pulled and tried to just get it working.

Default settings. My bot ID and Owner ID.

/src/index.js

module.exports = {
  discuss: new API(
    'flarum',
    'https://discuss.flarum.org',
    process.env.FLARUM_TOKEN
  ),
};

process.env.FLARUM_TOKEN is not defined in env, defining with a random value yields same result. When loading the url in my browser I see the API is publicly exposed so am I missing something?

I also saw in the readme.md that FLAGROW_TOKEN, but that is now https://extiverse.com/ so.. is that referencing a paid token for that case?

The error occouring is as follows --

Command: $discuss search Discord

Discord Error: MaxRetriesPerRequestError: Reached the max retries per request limit (which is 20). Refer to "maxRetriesPerRequest" option for details.

Console Error:

 ERROR  Reached the max retries per request limit (which is 20). Refer to "maxRetriesPerRequest" option for details.                                                                                   discord:discuss 13:55:38  

  at Socket.<anonymous> (node_modules\ioredis\built\redis\event_handler.js:172:37)
  at Object.onceWrapper (events.js:422:26)
  at Socket.emit (events.js:315:20)
  at TCP.<anonymous> (net.js:673:12)
Debaucus commented 3 years ago

Was browsing round and found the Cache.js, figured to removing the redis usage would be a start at fixing the flarum search part at least.

I commented out REDIS_URL= in env and the Flarum Search functionality works :D

I will leave this open if you want to work on other aspects of what I have reported, but can be closed otherwise. Will credit your guys great work!

yhoungdev commented 1 year ago

Mehn this is so bad. and you got no answers till now, under this discussion

luceos commented 8 months ago

This bot wasn't really meant for third parties, it could still be used for inspiration. Glad you figured it out @Debaucus. As I have over 1000 GitHub notifications, this one sadly got drowned in it, Discord would have been better 👍

The bit will see new activity later this year. But again mostly for first party applications. So do make a fork if you need this.