discord.js icon indicating copy to clipboard operation
discord.js copied to clipboard

Add support for the @discordjs/rest package in browser environments

Open TheOnlyTails opened this issue 3 years ago • 3 comments

Which package is the feature request for?

rest

Feature

I started recently working on a web dashboard for one of my bots, and I was looking for a package to make requests to Discord API (which obviously are very common on a bot dashboard) easier than using the native fetch API. I was delighted to see that this package exists, but was quite disappointed to see it doesn't support browser environments due to its use of big integer literals.

Ideal solution or implementation

I would like the library to be compatible with browser environments.

Alternative solutions or implementations

No response

Other context

No response

TheOnlyTails avatar Aug 04 '22 20:08 TheOnlyTails

BigInt literals are supported in all modern browsers, this is not the problem with support for browser environments. The two major things are event emitter and undici.request over fetch (which is significantly faster for node)

ckohen avatar Aug 04 '22 20:08 ckohen

I'm interested in this, for running a bot in a cloudflare worker, using the interaction webhook.

tomprince avatar Feb 09 '23 07:02 tomprince

once #9416 is merged and we move REST to async event emitter this will be resolved

didinele avatar May 05 '23 20:05 didinele

This is supported as of 2.0.0.

Jiralite avatar Oct 09 '23 22:10 Jiralite