discordgo
discordgo copied to clipboard
WASM support?
I think being able to target WASM would allow for some interesting use cases of this library.
what I have found so far:
- bot token errors on ws open
Get https://discordapp.com/api/v6/gateway: net/http: fetch() failed: <object>
- bot token errors on rest api call
Get https://discordapp.com/api/v6/users/@me: net/http: fetch() failed: <object>
- auth/login errors on ws open and rest api call
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://discordapp.com/api/v6/auth/login. (Reason: missing token ‘user-agent’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel).
Unable to fetch discord authentication token. Post https://discordapp.com/api/v6/auth/login: net/http: fetch() failed: <object>
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://discordapp.com/api/v6/auth/login. (Reason: CORS request did not succeed).
I have a feeling those fetch() failed: <object>
bits are where the useful error info would be, but I don't know how to get to it.
I'm using Go 1.13 and wasmserve, if that makes a difference