MeguminSama / discord-slash-commands

Node.JS Slash Commands for Discord
MIT License
100 stars 15 forks source link

[FEAT] Proper handling/throwing of Errors #24

Open DonovanDMC opened 3 years ago

DonovanDMC commented 3 years ago

Is your feature request related to a problem? Please describe. It's annoying that there's next to no indication that creation has succeeded if you aren't looking at the response (like I wasn't), and the typings don't indicate that a rate limit object can be returned.

Describe the solution you'd like Either add the rate limit object to the typings, and make it known it can be returned, or (what I would personally prefer) throw an error when you get ratelimited. (check status code & body)

Describe alternatives you've considered None.

Additional context

DonovanDMC commented 3 years ago

Moreover, besides ratelimiting, do something with all of the other errors, besides pretending like everything went fine