Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TheOnlyTails opened this issue Aug 4, 2022 · 4 comments
Closed

Comments

@TheOnlyTails
Copy link

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

@ckohen
Copy link
Member

ckohen commented Aug 4, 2022

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)

@tomprince
Copy link

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

@didinele
Copy link
Member

didinele commented May 5, 2023

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

@Jiralite
Copy link
Member

Jiralite commented Oct 9, 2023

This is supported as of 2.0.0.

@Jiralite Jiralite closed this as completed Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants