harmonyland / discord_rpc

Discord RPC module for Deno.
https://deno.land/x/discord_rpc
MIT License
14 stars 3 forks source link

feat: add support for other platforms than linux and improved, reading, sending #2

Closed DjDeveloperr closed 2 years ago

DjDeveloperr commented 2 years ago

towards #1

Had a few questions before I could start working on support for more commands, for which I've made NOTE comments.

Pretty much WIP, haven't tested as I use Windows and there's no unix socket support.. I'll try on a VM.

There's cool things like editing voice setting, creating game lobbies, selecting text channels, etc. which discord-ipc can do 😉

DjDeveloperr commented 2 years ago

Should I be using unique Symbols instead of #private fields (like _ipcHandle)?

littledivy commented 2 years ago

Should I be using unique Symbols instead of #private fields (like _ipcHandle)?

private fields are fine. _ipcHandle is a symbol because I didn't want users to use DiscordIPC's constructor directly

DjDeveloperr commented 2 years ago

Private properties seem to have some problem with the way DiscordIPC object is being created

image

littledivy commented 2 years ago

Hmm yeah downside of using private properties. Let's just use Symbols for now - I really don't want users to be able to use the constructor as its not part of the public API

DjDeveloperr commented 2 years ago

Tested on Ubuntu VM, seems to work

DjDeveloperr commented 2 years ago

How should events work? Should it extend a EventEmitter (std or x/event), EventTarget + on* or a just Async Iterator?

littledivy commented 2 years ago

How should events work? Should it extend a EventEmitter (std or x/event), EventTarget + on* or a just Async Iterator?

Preferably async iterators