discord.js - Imagine an app

DIA

discord.js - Imagine an app

Support server for discord.js, a Node.js module to interact with Discords apps API.

Join

djs-questions

djs-voice

i can't install @discordjs/opus

I try to install @discordjs/opus but i have this error Nodejs version : / 20.8.0 Windows 64 Bit Python 3.12 Discord.js version : 14.13.0...

ffmpeg EAGAIN

``` 23-10-2023 22:35:54 A: Error: spawn /home/container/node_modules/ffmpeg-static/ffmpeg EAGAIN at ChildProcess._handle.onexit (node:internal/child_process:284:19) at onErrorNT (node:internal/child_process:477:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {...

How loop music queue?

```js var channel = message.member?.voice?.channel; const connection = await joinVoiceChannel({ channelId: channel.id,...

[commonjs] Unexpected token

Hi šŸ™‚ I'm working on a Discord integration for Foundry VTT, and I'm having an issue with getting discord.js to play nice with my toolchain. I'm getting this error when I try to build: ``` yarn run v1.22.19 warning package.json: "dependencies" has dependency "discord.js" with range "^14.13.0" that collides with a dependency in "devDependencies" of the same name with version "^14.11.0"...

FAQ: Voice connection disconnects after a short time

Make sure you are using version 0.16.0 of @discordjs/voice or newer.SystemMessageWarn Check that this also applies to all voice-related packages that may use other versions! ```ansi npm list discord.js...

After 40/50 seconds it automatically disconnects

There is no errors in it, I'm using "discord.js": "^14.11.0", & "@discordjs/voice": "^0.16.0", Node version: v18.17.0 Is there any fixes?...

Bot suddenly stops playing music

when playing bigger songs, bot suddenly aborts ```Error: aborted at connResetException (node:internal/errors:717:14) at TLSSocket.socketCloseListener (node:_http_client:462:19) at TLSSocket.emit (node:events:525:35)...

Trying to convert audio to different format

Hello, I'm facing with an issue. I'm trying to convert the Opus audioformat to MuLaw, but idk how to do this. Any ideea ?

Recover audio and mute user

Hello I would like to be able to record audio in a voice room (and if possible only record what a user defined by id says) I have not found a clear explanation for version 14 of discord.js, could Can you explain to me how I can achieve my goal?

Is it possible to have 2 bots in voice channels in discord js?

I registered two clients. I attempt to connect each to a voice channel, and after the first bot connects, the second will not connect. Additionally, getVoiceConnection returns a voice connection when the second bot attempts to connect

Get existing connection with endpoint, token and session

Hello! I am currently working on a music bot which will have voice recognition capability i've gotten the music part to work (i use lavalink-client) and i've also gotten the voice recognition to work. Now my issue is, is having both work together. When a user does /play it establishes a connection through lavalink-client and lavalink-client doesn't give full voice connection data except endpoint, token and session so I was wondering how can i essentially tap in to that connection using tho...

The bot is stuck at the "connecting" state and not going to the "ready" state

I am really sorry for reopening. I tried adding the debug console but wasn't able to identify the error, I was convinced that it was fixed when I saw my bot enter the "ready state" on the debug console. But the thing is, the bot only enters the ready state when it leaves the vc, but it stays in connecting state when its in the vc

The bot is stuck at the "connecting" state and not going to the "ready" state

Hello, I am not really sure why the bot is staying in the connecting state and not moving to the "ready state" How do I solve this? If there is any additional info I need to provide, please let me know...
No description

Issues with getting an guild ID

Hello! I'm trying to receive an guild ID using the @discordjs/voice package, but everytime I try to request it it returns with undefined, so ofcourse it doesn't work. How can I make it work?

Get if audio is played in connection in other file.

Hello, i have music bot with commands in separate files i want to see if audio from mp3 is played in other commands is thia possible?

Local Audio Streams

I've been trying for the last 4 hours to try and get local audio files or audio streams to work with djs and im still quite lost. I've tried everything and read the docs, im just not understanding how to do this. All I want for now is to play a local audio file in a voice channel, so that I can move forward I've gotten some weird errors, but I feel like Im going about this all wrong. Help very much needed...

Question regarding djs/voice

My Boss asked me if its possible to set User Agents in djs/voice but im not sure it this is a thing.

Error: Cannot find module 'C:\Users\rocko\Desktop\.ospreyMusic\node_modules\@discordjs\voice\dist\in

I have installed it but idk why its doing this with just const { joinVoiceChannel } = require('@discordjs/voice');

Controlling volume

suppose this is my code:
const resource = createAudioResource('songs/skibidi.mp3');
const resource = createAudioResource('songs/skibidi.mp3');
how do i make this audio inline and how to control its volume? Also, what does inline audio do?...

Issue w/ Opus -> Ogg recording voice with [email protected] - ERR_REQUIRE_ESM

I was trying to follow this example recording voice demo (https://github.com/discordjs/voice-examples/blob/main/recorder/src/createListeningStream.ts#L19C1-L27C5), but I'm running into the following error: ``` šŸ‘‚ Listening to dimsey8_0 Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/user/Desktop/unicorn/Voice/node_modules/node-crc/lib/lib.js from /Users/user/Desktop/unicorn/Voice/node_modules/prism-media/dist/ogg/OggLogicalBitstream.js not supported. Instead change the require of lib.js in /Users/user/Desktop/unicorn/Voice/node_modules/prism-media/dist/ogg/OggLogicalBitstream.js to a dynamic import() which is available in all CommonJS modules....