Safemoon-Protocol / Discord-Bot

SafeMoon's Discord Bot.
GNU General Public License v3.0
117 stars 36 forks source link

Watching Price: Failed #9

Closed jimango closed 3 years ago

jimango commented 3 years ago

I get this following error at the bot. How would I go around to fix this?

  isAxiosError: true,
  toJSON: [Function: toJSON]
}
TypeError: Cannot read property 'toFixed' of undefined
    at getPrice (/home/***/***/Discord-Bot/src/bot.js:110:48)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Timeout._onTimeout (/home/jonathan/Safebot/Discord-Bot/src/bot.js:49:17)

I appreaciate any help I can get :)

Regards Jonathan (Much love and exitment today/night for the steep climb of SafeMoon)

reecebenson commented 3 years ago

Hi @jimango,

There have been some new changes made to the repository, I'd suggest pulling the latest changes and this issue should disappear. Unfortunately, this was caused by dex.guru adding CloudFlare infront of their API service, so the bot is not able to pull data from there at the moment. We've made it so that it attempts to pull dex's API, but if it fails, it will fallback to Pancake's API.

Cheers