frc5183 / Oatmeal

MIT License
2 stars 0 forks source link

Nuke Command Fix #6

Closed Trip-kun closed 1 year ago

Trip-kun commented 1 year ago

The nuke command frequently runs into ratelimit issues while operating because it quickly spams requests to delete messages. The bot should limit itself to prevent a ratelimit by waiting every few messages (as specified in discord ratelimit) and then starting again.

Baconing commented 1 year ago

There is a deleteMessages method for bulk deleting that uses a List which should fix this rate limit issue when under 100 messages, otherwise just use the current method but with deleteMessages rather than deleteMessage. (maybe also ask for confirmation if >100 messages?)

Trip-kun commented 1 year ago

This seems like a perfect solution, and I think it'll line up perfectly with the getMessages that we call, simplifying the entire system