DarkstarDraconis
DIAdiscord.js - Imagine an app
•Created by DarkstarDraconis on 5/7/2024 in #djs-questions
Deno / Websocket error
To start with, as I understand it, Deno is not officially supported.
That said, from what I have been reading, it seemed like there was a reasonable chance of djs working with Deno since it added support for npm packages.
I would really like to use Deno for my bot, so I gave it a go...
Unfortunately, no dice -- I'm getting an error when djs is attempting to construct a WebSocket.
I'm wondering if this is a familiar problem, or if anyone has an idea for what may be a fix for this.
Here is the error when I attempt to run (I use "deno task simple" to run it):
deno.json
simple_main.ts
The error is pointing at index.js in djs, which is doing this:
The tooltip is telling me arg2 should be a
string | string[] | undefined
which is probably why the underlying code is throwing the error.
Again, I understand there isn't any official support, but if there's a workaround for this that allows me to continue using Deno, I would appreciate any ideas.
In case it matters, deno --version
:
39 replies