discord.js - Imagine an app

DIA

discord.js - Imagine an app

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

Join

djs-questions

djs-voice

FAQ: Cannot play audio as no valid encryption package is installed (After installing sodium-native)

Can someone help me on this issue? The sodium-native is already installed, but the @discordjs/voice still didn't recognize it :convit: ```ts -------------------------------------------------- Core Dependencies...

ffmpeg potential memory leak

Hello, so I'm here because I m searching what's causing these ffmpeg execution to be kept 2 hours in memory. So as I know my bot's having memory leaks and in my search to find out why I'm here to ask you about this line :
node_modules/ffmpeg-static/ffmpeg -i - -analyzeduration 0 -loglevel 0 -acodec libopus -f opus -ar 48000 -ac 2 pipe:1
node_modules/ffmpeg-static/ffmpeg -i - -analyzeduration 0 -loglevel 0 -acodec libopus -f opus -ar 48000 -ac 2 pipe:1
So I know it's ffmpeg and it's used to convert the songs into a proper way so that discord api can send it in vocal. But I'm searching how to clear them properly....

How do you get a voice channel's user list?

Hi, I'm building a bot that: can join a voice channel on slash command and: start recording the list of users that are in this channel, repeat every one second afterwhich, output the list of users to a database in the following way: for(each user){...

AudioPlayer goes from buffering -> playing -> idle and warns that resource is not playable

Hi, I have troubles for the last months with playback of resources. The source is available at https://github.com/manuel-rw/jellyfin-discord-music-bot Even though the stream URL seems correct to me, the bot goes into idle after a few milliseconds and it stays silent in Discord....

Live playback of audio coming from discord causes crackling issue

I want to play incoming discord audio directly in the speakers. Here is my code so far: ```js const connection = joinVoiceChannel({...

Playing a single audio

How can I write a code for the bot to join a vc and play just one mp3 and then leave? How can I do that?

I can't get the audio to start

I have the bot that connects to the voice channel but does not start the audio, I leave the complete code and some logs that the bot gives me.

After disconnecting once, audio starts audibly buffering

Here is part of my /play command: ```ts const connection = joinVoiceChannel({ channelId: interaction.member.voice.channelId,...

member.voice.channelId undefined on client ready.

hola senores, any reason why my bot can't "see" a member's voice channel data when it turns on? for example, the channel id is undefined until said user leaves and rejoins the channel. is this a caching issue? and if so, how can I update the cache immediately after turning the bot on? thanks in advance!

RTC region Null

https://cdn.uira.xyz/acoustic/uEPKgU.png only happens when u select a automatic region aslong as u assign a region it doesnt show null any fixes?...

Type 'InternalDiscordGatewayAdapterCreator' is not assignable to type 'DiscordGatewayAdapterCreator'

```json // package.json "dependencies": { "@discordjs/voice": "^0.17.0", "@prisma/client": "^5.20.0",...

Trying to play a clicking sound effect in a voice channel, however I get this instead.

Hi, My @discordjs/voice version is 0.7.5 and I'm having a slight issue with playing it. I've tried to install ffmpeg by using sudo apt install ffmpeg, however, no luck. Here's my playClickSound function:...
No description

how to set voice channel status?

i looked through the documentation and cant find a way to set voice channel status unless i missed seeing it is there any way i can do this?...

need help with this code

Hey, I’m tryna make a bot that checks for a specific keyword within someone’s custom status and if they have the keyword, it gives them a role, and if they don’t, it removes the role. The code is semi working, it’s logging in the console every time someone changes there status but isn’t logging when it is the correct status. and removes the role even if it’s the wrong or right status.

AbortError: the operation was aborted

I've been getting this error for a while now (I'm on the latest DJS version 0.17.0 atm but I believe this has been occurring well before that). It appears to be occuring randomly, and I've only recently started potentially correlating it to a full bot crash for me. Any help is greatly appreciated.
No description

what does this error mean?

``` C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules@discordjs\voice\dist\index.js:362 this.socket.once("close", () => reject(new Error("Cannot perform IP discovery - socket closed"))); ^ ...

voice is playing on local but not on server

Hi Ive got a problem with this code: ```js if(interaction.commandName === 'musicradio') { const { createAudioPlayer, createAudioResource, joinVoiceChannel } = require('@discordjs/voice');...

YTDL AudioPlayer.play gives error

Hello! Trying to replicate a pseudo music bot from links with YTDL The bot enters in channel, but then returns the error: Error: Cannot play a resource that has already ended. Code: ``` var connection = voice.joinVoiceChannel({...