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

encryption does not work

I am using the latest discord.js/voice 0.18.0 and [email protected] but unfortunately when the bot joins the voice channel the connection is degraded from encrypted end to end to secure only.

Bot don't join VC (err: TypeError: Cannot read properties of undefined (reading 'set') )

When i try to do this ```js const connection = joinVoiceChannel({ channelId: channel.id, guildId: channel.guild.id, adapterCreator: channel.guild.voiceAdapterCreator,...

Measure packet loss

Hi! Are there any way to measure the packet loss or to know when a packet has been lost? I would like to measure that for statistics and then maybe report them to my host provider because i seem to have at some times some packet loss which, for a music bot is quite annoying

Typescript complains about adapterCreator after upgrading to v0.17.0

i updated @discordjs/voice from 0.16.1 to 0.17.0 and discord.js from 14.14.1 to 14.16.3, and now this snippet makes typescript complains about ``` Type 'InternalDiscordGatewayAdapterCreator' is not assignable to type 'DiscordGatewayAdapterCreator'. Types of parameters 'methods' and 'methods' are incompatible. ......

The bot says it's playing the audio but I can't hear anything on discord.

```ts import { createAudioPlayer, createAudioResource,...

@discordjs/opus: make: g++: Command not found

@discordjs/opus doesnt install via NPM, Gives error: make: g++: Command not found Im using a oracle linux cloud VM, I have GCC installed with version 8.5 Full error log is given in file...

bot leave voice channel after a while

My bot leaves voice channel after a while so i let him join the vc every 30m but it works only on one server it doesn't work on all servers im going to send my ready.js file because it has the joining vc code ```javascript const color = require('chalk')...

Play audio problem

Hello, I have a problem with the "@discordjs/voice" package, and the problem is in playing the sound. Well, to understand the problem, let's assume that there are two servers, the first is called Server 1 and the second is called Server 2. When I play songs on Server 1, the same song will play on Server 2. What is the solution to this problem?

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",...
Next