Zaarrg / DropBot

Drop Bot. Automaticlly Farms every Drop available like Rust for ya and now also your Custom Channel's
396 stars 121 forks source link

Error while trying to send the discord webhook #69

Open dawinaj opened 1 year ago

dawinaj commented 1 year ago

Hello, I am getting such error (btw which crashes the app, which imho should not happen as discord is just a notification and not a critical piece of the program):

2022-09-17 22:38:45: Unhandled Rejection at: Promise { <rejected> 'Error while trying to send the discord webhook' }
2022-09-17 22:38:45: Unhandled Rejection Reason: Error while trying to send the discord webhook

image

My bet is that the message is too long, because after disabling debug, it works fine.

PockySweet commented 1 year ago

A big problem with how the bot is handling webhooks is that there is no cooldown or waiting applied which causes the channel webhooks to get ratelimited, if all event types are enabled the bot can end up sending way too many messages super fast, specially when starting it.

A good solution would probably be a way of combining several events in a single embed message instead of each event sending it's own.

For me a solution was using ttvdropbot_webhookevents with the following event types: "claim newdrop newgame progress start error getresult"