Files
discordeno/packages/rest
NotDemonix 9102fc4ecc feat(rest): add request timeout to manage stalled requests (#5085)
* feat(rest): add request timeout feature to manage request retries

* fix(rest): avoid calling Node-only Timeout.unref() on non-Node runtimes

* fix(rest): use try/catch for fetch to guarantee a Response on the success path

* refactor(rest): use AbortSignal.timeout and retry proxy requests on timeout

* refactor(rest): simplify timeout detection and use .catch() in proxy path

* refactor(rest): move isTimeoutError helper to bottom of file
2026-06-16 19:25:40 +02:00
..

Discordeno Rest

Discord API library for Node.JS, Deno & Bun

Discord codecov action status

A standalone REST module with functionality of REST, independently.

  • Easily host on any serverless infrastructure.
    • Easy to use and setup with Cloudflare Workers (FREE for 100K requests per day!)
  • Freedom from global rate limit errors
    • As your bot grows, you want to handle global rate limits better. Shards don't communicate fast enough to truly handle it properly so this allows 1 rest handler across the entire bot.
    • In fact, you can host multiple instances of your bot and all connect to the same rest server.
  • REST does not rest!
    • Separate rest means if your bot for whatever reason crashes, your requests that are queued will still keep going and will not be lost.
    • Seamless updates! When you want to update and reboot the bot, you could potentially lose tons of messages or responses that are in queue. Using this you could restart your bot without ever worrying about losing any responses.
  • Scalability! Scalability! Scalability!