discord.js - Imagine a šŸ‘»

DIA

discord.js - Imagine a šŸ‘»

Support server for discord.js, a Node.js module to interact with Discord's apps API.

Join

djs-questions

djs-voice

Multibot System Question

I’m working on a system where bots (agents) are assigned to specific channels and play sounds when users join those channels. For example: • Bot1 is assigned to Channel1 • Bot2 is assigned to Channel2...

Can't install @discordjs/opus

Okk, sooo... i was trying to download it and i'm receiving this error error: https://pastecode.io/s/u5npy6g2 Could someone help me plsss?...

What Is This Error

throw new Error(`No compatible encryption modes. Available include: ${options.join(", ")}`);
^
Error: No compatible encryption modes. Available include: aead_aes256_gcm_rtpsize, aead_xchacha20_poly1305_rtpsize, xsalsa20_poly1305_lite_rtpsize
throw new Error(`No compatible encryption modes. Available include: ${options.join(", ")}`);
^
Error: No compatible encryption modes. Available include: aead_aes256_gcm_rtpsize, aead_xchacha20_poly1305_rtpsize, xsalsa20_poly1305_lite_rtpsize
It's Coming Suddenly Now My Bot Isn't Working... It Was Working Very Stable Before...

Listening to the voice channel without specifying a user

I remember a code block about this on discord.js; however, I looked at the methods and searched the internet. Couldn't find it. Maybe I remember wrong :Thonk:...

noise that happens on the bot

I need help fixing the noise that happens on the bot audio not the original video

Version 0.19.0 stuck in connecting state

Discord Voice Connection Stuck in "Connecting" State After @discordjs/voice v0.19.0 Upgrade Setup: • discord.js@14.21.0 • @discordjs/voice@0.19.0 (upgraded from 0.18.0)...

Unable to decode opus packets from VoiceReceiver with dave encryption users

-------------------------------------------------- Core Dependencies - @discordjs/voice: 0.19.0 - prism-media: 1.3.5 ...

Issues receiving and decoding opus from browser/vencord clients

I am able to successfully decode opus data to pcm from other users except my friend who is using the vencord client which apparently uses the discord web client as a base. The decode function doesn't error and I receive unplayable pcm data.
No description

NEED HELP WITH TOKEN

Hello everyone, I'm completely stuck on a persistent TokenInvalid error when deploying my bot on Render and I would really appreciate some help. I know this is a common error, but I have already tried every possible solution I could find, including:...

bot cannot connect

```js const connection = joinVoiceChannel({ channelId: channel.id, guildId: channel.guild.id, adapterCreator: channel.guild.voiceAdapterCreator,...

Multi-socket logic for audio stream

Anyone could explain the logic for multi sockets of using discord voice for streaming different audio url streams across multiple guilds? Current logic, I know how to do is a single socket, but after some time the bot start disconnecting from voice channels because of it. Thanks for any tea spoons of taste

Bot Voice Connection Issues

I recently have gotten reports from users about my bot having issues staying connected to the voice channel in specific communities. More specifically, a yellow exclamation point appears on the bot in the voice channel and flickers in and out, indicating that the bot is having trouble staying connected. Furthermore, most likely as a result from this connection problem, the bot will end up repeating audio which I've told it to play (usually it repeats it once instead of just playing it once). Sometimes it will not play audio at all. The behavior is usually that it will join and play the audio successfully the first time, and then fail to play or repeat the playing of the message when the audio is played the second time. I've tried having the users in the affected community change the voice region to be closer to the bots hosting provider and also closer to their own location. Despite this, the issue persists and I am not able to replicate the problem in my own Discord community (even when switching voice regions, etc). Any advice? Dependency Report: ``` --------------------------------------------------...
No description

Bot Voice Connection Issues

I recently have gotten reports from users about my bot having issues staying connected to the voice channel in specific communities. More specifically, it shows a yellow exclamation point appears on the bot in the voice channel and flickers in and out, indicating that the bot is having trouble staying connected. Furthermore, most likely as a result from this connection problem, the bot will end up repeating audio which I've told it to play (usually it repeats it once instead of just playing it o...

Is it possible to record as WAV?

I'm currently working on a bot that listens to a user and kicks them from the voice chat if they say a banned word. Right now, it's working but a bit buggy. It currently saves a .pcm file when a user talks, and sends the filename to a python endpoint I'm hosting locally. Python converts to mp3 via ffmpeg and then transcribes the audio to text via openai's whisper library before returning whether or not to kick the user based on the trabscribed text. My issue is that the ffmpeg is causing a lot of latency, I was wondering if I can record straight to WAV instead since (as far as I understand) WAV is sort of like PCM with additional headers? If not possible not sure if anyone knows how hard it is to add those headers myself. Ultimately looking to reduce latency by getting rid of ffmpeg in the middle... Thanks!...

Pure-js PCM Resampler lib @purinton/resampler

https://github.com/purinton/resampler A pure JavaScript, high-quality PCM audio resampler for Node.js. Converts s16le PCM between arbitrary sample rates and channel layouts (mono/stereo) with windowed-sinc filtering. I had been using ffmpeg for my resampler in my voice apps, but I wanted to try other options. I found using libresample and some of the other options like the WASM one just weren't cutting it so I made my own Pure-js resampler, and I've cut out ffmpeg completely. Sharing here incase anyone else might find it useful!...

WebSocket properties

How i can define ws properties in @discordjs/ws@^1.2.3?

Beginner to Discord JS, Audio Not Playing

Hello, I just started learning discord js, i wrote a simple connect and playcommand using the guide but didnt work, asked gpt to add some state logs and here is the code. The bot joins the channel but no sound is played ```js...

About TimeoutNegativeWarning

recently my bot keep getting this warning when using @discordjs/voice ```bash (node:7384) TimeoutNegativeWarning: -17 is a negative number. Timeout duration was set to 1....

Electron renderer crashes after importing @discordjs/voice

In my electron project I have the renderer set up as below: ```js let win = new BrowserWindow({ webPreferences: { nodeIntegration: true,...
Next