We can either implement our own internal Discord library or use an existing one. I used to use discordie, at the time it was the only one with good audio implementation.
I'd like to analyze each library, its benefits and limitations. Currently, there is four JS libraries:
discordie
discord.js
discord.io
Eris
Edit: I've decided to create my own API wrapper.
After choosing a library, we have to rethink some concepts:
DJ: A voice channel controller
Playable: Something that can be transformed into an audio stream (eg: soundcloud)
Playlist: Something that contains multiple Playables (eg: youtube playlist)
Decoder: Decodes audio streams to raw PCM (depending on the library, we don't have to implement this) (eg: ffmpeg)
Encoder: Encodes audio streams to opus (depending on the library, we don't have to implement this) (eg: libopus compiled with emscripten)
Converter: It's a decoder and encoder at the same time. For that reason, it can encode/decode in one go
Components: An instance that can handle events and use the API however it wants. (eg: chat track request)
I have a lot of ideas for core components, but it's not the time to talk about that yet.
I'd like to host DiscordDJ's official bot, but I don't have a server for it.
There's a lot of work to be made.
We can either implement our own internal Discord library or use an existing one. I used to use discordie, at the time it was the only one with good audio implementation.
I'd like to analyze each library, its benefits and limitations. Currently, there is four JS libraries:
Edit: I've decided to create my own API wrapper.
After choosing a library, we have to rethink some concepts:
I have a lot of ideas for core components, but it's not the time to talk about that yet.
I'd like to host DiscordDJ's official bot, but I don't have a server for it.