Comments (8)
We are not supporting browser as a target since it requires a lot of additional workarounds and maintenance for it to work. You can use it on flutter with android target and on cli just fine.
from nyxx.
@RandomModderJDK this looks more like a compiler bug than something on our end. Either way we do not support js as a target, as l7ssha said.
from nyxx.
Why does nyxx even use components that are not functional in the web. The discord api doesnt benefit from platform specific features in particular except from audio features.
What would be needed to make it completely platform independent?
from nyxx.
Nyxx uses isolates to implement sharding, as recommended by discord, and dart:io in several places to implement helpers. We also use dart:io in the isolates to speed up decoding.
If you really want to run nyxx in the web, I can patch these out and push them to my fork that you can use from a git dependency. We will not be merging these changes, or any changes aimed only at adding web support to this repository as it complicated several aspects of the code, would probably be breaking, adds dependencies on other packages and isn't something we recommend doing anyway.
from nyxx.
That would be really kind of you
from nyxx.
Alright, I've made the necessary changes.
I really don't recommend using it because it disables several features (including the IgnoreExceptions and CliIntegration plugins) and restricts other parts of the API (e.g transport compression can't be used, so you'll have to choose something else when connecting to the API). Additionally I had to route all requests through a CORS proxy because Discord, sensibly, doesn't manage CORS on their API which makes browsers unable to use it.
The proxy is hosted on a cloudflare worker, and I'm making no guarantees as to its stability or longevity. If it goes down, nyxx won't be able to contact the Discord API and your application will stop working. I really recommend you change this and use your own proxy that you host - and if you can do that, why not just run nyxx on that server?
Anyway, with all that said, the code can be found here and depended on using a git
dependency targeting https://github.com/abitofevrything/nyxx
and ref: hack/web-support
.
from nyxx.
Related Issues (20)
- [rewrite] Implement Threads
- onGuildMemberAdd doesn't trigger HOT 2
- Setting the DND Status for the User HOT 1
- bug: Error whenever a post is reopened HOT 1
- AttachmentBuilder.fileName should not be optional.
- Better plugin interface
- Make Attachment implement CdnAsset
- Allow specifying stdout and stderr for Logging
- Incorrect method usage in README example
- Incorrect method usage in README example HOT 2
- Provide caching for "special" entities & gateway initialisation data
- Assertion error when having a 0xffffff value on DiscordColor
- Error when trying to fetch a message that has mentioned roles
- NyxxPluginState is not exported
- Cannot parse mentions in MESSAGE_UPDATE
- Type cast is incorrect when using etf payload format HOT 1
- http iteractions backend support
- Music Bot HOT 1
- Allow customising gateway properties when Identifiy is sent. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nyxx.