#archive-voice
30636 messages · Page 2 of 31
and then check
np
FYI @vocal valley I succeeded in using the adapter, and using this new voiceConnection and play audio succesfully from my system. When I deployed to my host, it still gave an error, but this time I was able to track it to the UDP connection.
So, this means my Hosting provided might be blocking the UDP connection. I'll try to contact them about that...
But ti also means that in the regular Voice module of discord.js (not the new @discord/voice, which is OK), UDP error are not trapped by try/catches.
Anyway, thanks guys for your help! Hopefully my Hosting provided will be receptive... !
no problem!
Good luck with getting that resolved
how can i bassboost a song?
outside the scope of this lib, presumably you could do it with ffmpeg
ight
Mind if we have a (hopefully) short discussion on how to install the basics and get an audio file to play? I had it working in v12 obviously it is different now. I see the pinned messages. I'm looking at the preview-595 guide as I type. Should I type the npm install line with "libsodium-wrappers" it specifically says "for example" which sounded like I could change that to sodium for "(best performance)". Doing that didn't work the install barked and logged something I had never seen before re: please set your MS VS version before you run install. I see the tip in the doc about "if you are struggling" is this what is meant? and am I correct in assuming that one types in --vs2015 regardless of what version of VS one is using even if it is VS Code?
Oh, the log file BTW mentions "npm config set msvs_version 2015" as a way to set the version do we believe that is more or less equivalent to the TIP instruction?
Don't bother installing sodium on windows.
okay thanks
I tried the line mentioned in the log, it didn't help as the installer now wanted a copy of VS2015 to be around
libsodium-wrappers worked
the generateDependencyReport report looks reasonable
I seem to have tweetnacl: 1.0.3 automatically because I didn't ask for it
hey all!
i'd like to achieve this kind of flow - a bot which will react on a command (for example !play last-show) which will output a button to the user with a PLAY label on it, and once the user clicks - it will stream the audio from the latest mixcloud's show from my user.
Getting the last show from mixcloud's api is quite straightforward.. i wonder if there's an option to stream its' audio via discord's audio channel or somehow embed mixcloud's widget in the channel itself?
might have been included with your discord.js install 👍
thanks for that heads up... wasn't worried about having extra mostly about not having enough 🙂
a few hours later... no errors for the moment and no sounds ... sure is fun 😫
are you running the example?
if you mean the music-bot example then no.
ah ok
if you want, you can send the code you're using and i can take a look tomorrow to see what the issue might be
that's awfully nice of you... I'm resting and then I'll take another look or two. I've looked at that music-bot code but frankly as an example it is over engineered. Typescript, babel, jest, prettier, linter, some streaming stuff. That might be example two but not the hello world of audio.
I'm putting in more logging to try to determine where the issue may be. I don't see the connection.on events firing for instance.
the basic example might be easier to try and aid with debugging
I also search for messages here... one error informed me I didn't have the latest version of v13
ah yeah, that's come up a few times today
Yup 🙂
I wish I could do it but if the things people encounter could be set into a "you're probably going to do this" page it would go a long way.
I was also hoping that someone who distilled it down to "play a single .mp3 file" might post their experiences.
Ah I seem to have overlooked the basic example... what you posted now makes sense... I think I can paste that somewhere into my app without a lot of issues, thanks.
no problem! hopefully it works well for you
works well? Hopefully it "beeps" 🙂
thanks
This should work:
const { Client, Intents } = require('discord.js');
const { joinVoiceChannel, createAudioResource, createAudioPlayer, StreamType } = require('@discordjs/voice');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_VOICE_STATES] });
const player = createAudioPlayer();
client.on('message', async (message) => {
if (message.content === '!play') {
const channel = message.member.voice.channel;
if (!channel) return message.reply('You must be in the voice channel.');
const resource = createAudioResource('https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3', { inputType: StreamType.Arbitrary, });
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,
});
player.play(resource);
connection.subscribe(player);
await message.reply('Playing now!');
}
});
void client.login('token here');
now that is an audio "hello world"...
gracias
Yahoo that plays... much better when I type the command in my server, in my bot 🙂
Nice music
I can adapt it from here, thanks everyone
🎉
I've been having great success and migrated my little sound demo from v12 to v13 and added that SoundHelix song to the options. Meanwhile it seems that one can only set the volume if the inlineVolume option is set to true. I gather from the docs that this plays through the ffmpeg service which (I'm guessing) is the only one that supports volume, is that correct? The notes about improved performance concerns me a bit has this always been the case with ffmpeg? Volume control seems to be pretty much necessary doesn't it?
"There are only two kinds of programming languages: those people always bitch about and those nobody uses." -- Bjarne Stroustrup
@brazen crag You can use this example
Hi Tom. You can only set the volume if inline volume is enabled that is correct. It's not necessarily because of FFmpeg, but it basically requires us to decode the audio stream into raw audio within Node.js somewhere in the pipeline which isn't the best for performance (although not horrendous) - this is why the feature is opt-in 👍
Not sure, since mixcloud doesn't have mp3 endpoints which i can use directly
Give me a link of mixcloud
example of mixcloud endpoint
The audio streams are not available through the Mixcloud API. There are two reasons for this.
Firstly, we need to know what has been listened to so that we can report usage, pay royalties and provide features such as 'Suggested Shows'.Secondly, Mixcloud needs to pay the bills! We can't give away the audio for free outside of mixcloud.com simply because it costs us to host and stream the files and pay royalties.
@brazen crag Mixcloud never streams audio
So there is no possible way to stream audio through their api's
And what about their embeddable widgets which can be freely used on html pages? Is it somehow possible to embed them graphically on discord's interface?
interesting question, let me double check 👀
I can't find any way to use that embeddable widgets as Discord don't allow to attach HTML frames in their embeds
ok buddy! thanks for research and answers ❤️
Looking at the example, feel like over engineered @.@
👀
I meant the typescript example, well at least after toasting my brain, able to "downgrade" it to js and make it modular
I know, there is only typescripts examples only 🙂
But you could have used your brain here also : https://deploy-preview-595--discordjs-guide.netlify.app/voice/
There is also the basic example as a nicer introduction
@vocal valley Is there anything in player like ispaused() like in v12 voice ??
is ok, manage to settle it
player.state.status === AudioPlayerStatus.Paused || player.state.status === AudioPlayerStatus.AutoPaused
Oh I forgot about that LOL
I wont say it is 100% my code though, since I didn't understand the track and subscription, I shamelessly copied it and import it to my code
I don't think there is anything wrong with that,
subscription just creates a new Player and attaches one queue to voice connection.
While tracks collects data using ytdl-core like song.title, song.url etc.
The new voice library has a lot of low-level stuff and it makes sense to use something that works and handles edge cases for you
New Voice API is more flexible than old one. You can literally handle any event with connection and audio player separately.
Not place to ask this here , go to #archive-djs-v12-deprecated
oh, sorry
For music bot, what is the recommended RAM size?
I don't plan to make it public though
It will depend how many simultaneous players you'll have
Error: Cannot perform IP discovery - socket closed
at Socket.<anonymous> (D:\Coding\DisTube\DisTube\node_modules\@discordjs\voice\dist\networking\VoiceUDPSocket.js:120:52)
at Object.onceWrapper (events.js:482:28)
at Socket.emit (events.js:388:22)
at socketCloseNT (dgram.js:748:8)
at processTicksAndRejections (internal/process/task_queues.js:81:21)
My connection emitted this, should I ignore it since my connection is not disconnected nor destroyed? It's disconnected and reconnect the vc after that
yep you can ignore it 👍
secretbox.methods.close(opusPacket, connectionData.nonceBuffer, secretKey),
^
TypeError: secretbox.methods.close is not a function
any solution what's happening here?
Is this for music like rythm?
Install sodium / libsodium-wrappers
why djs voice needs encrypiton now?
it worked btw
It's in the requirement of the new package
Actually @discordjs/voice has some issues with tweetnacl(default with djs), so please install libsodium-wrappers or sodium
sodium wrappers worked
You can get a comparable sound quality and performance with this new voice api as compared to rythm and many more music bots
@frosty dawn Here it is
it always has, it's just that discord.js included tweetnacl for other purposes, so the voice api in there could use that as a fallback
How can I use it to get the good sound quality?
as long as you provide it a good quality audio stream, it should be able to play it back reliably
it's much less choppy compared to discord.js v12's voice
VoiceConnectionStatus.Ready !=="Ready"
will this work?
what are you trying to do
maybe if statement i guess
the string values for the VoiceConnectionStatus are here if this is what you were wondering, https://discordjs.github.io/voice/enums/voiceconnectionstatus.html
check for ready state
yes
you should be doing something like:
voiceConnection.state.status === VoiceConnectionStatus.Ready
to check for the ready state
if you want to listen for it like an event,
const myConnection = createVoiceConnection(...);
await entersState(myConnection, VoiceConnectionStatus.Ready, 30_000);
// ready within 30 secs, otherwise it would have thrown
or
// one option
voiceConnection.on(VoiceConnectionStatus.Ready, () => console.log('Ready'));
// another option
voiceConnection.on('stateChange', (oldState, newState) => {
if (oldState.status !== VoiceConnectionStatus.Ready && newState.status === VoiceConnectionStatus.Ready) {
console.log('Ready');
}
});
// both are equivalent
If someone disconnects the bot, the reason of VoiceConnectionDisconnectReason should be EndpointRemoved or WebSocketClose?
hmmm i have not actually tested that
I think it would be WebSocketClose
Hmm... I thought it must be EndpointRemoved. Thanks :v
np, can confirm it is WebSocketClose, with code 4014
However I made a mistake in the typings that makes it hard to extract the closeCode, will fix that later today
How can I get all audio players?
in a connection or in all connections ??
you're expected to track them yourself
if you have all your voice connections, you can find your audio players that have at least one subscriber
all of them
How do I get all connections then? because getVoiceConnection asks for a guild ID
I think this might work :
var guild_array = client.guilds.cache.map(guild => guild.id)
guild_array.forEach((guild) => {
var connection = getVoiceConnection(guild)
if(connection) {
//RUN some Code
}
})
So time to move onto YouTube videos... these used to play in v12 but I've tried any number of twists on the code that plays audio files (both from my drive and from a url) and while I see the video image displayed in Discord message the video does not play automatically. Do these operate similar to audio files?
Show me code where you played local file
it is spread out a tiny bit but let me see about gathering the parts. In a nutshell what I've tried was requesting a YouTube video and at the last moment playing a file on my PC. This worked which tells me all the "setup" seems to be present. I then pass the url of the video to the createAudioResource function and the video does not play.
' const resource = createAudioResource(soundFile, { inputType: StreamType.Arbitrary, inlineVolume: true });
audioPlayer.play(resource);
'
how much code do you need this is the resource and playing in the audioPlayer
SoundFile is a path ??
Only this much
soundFile is the url or the path depending
Can you show me where you declared SoundFile ?
if I set it to the URL of an audio file it plays, if I set it to a path on my drive it plays
soundFile is string property
So what is not playing ??
the YouTube video
maybe there is an "actually start it" option?
You need a module to play youtube Video
Download ytdl-core module
done already
and ffmpeg
Can you download ytdl-core-discord ??
this was running in v12 maybe there is an updated version of those modules?
bet you not
oh I thought you asked if I did
of course I can
So do it
by URL of the video, do you mean the URL of the videos page on YouTube?
Yes both the actual string and the url that came back from a call to ytdl.getInfo(args[1]);
Hmmm ok, I'm not sure if you can play that directly as a string
const ytdl = require('ytdl-core-discord')
const resource = createAudioResource(await ytdl(url), { inputType: StreamType.Opus, inlineVolume: true });
audioPlayer.play(resource);
Then try this
that will probably work, one moment
also as a rule of thumb now, I don't recommend ytdl-core or ytdl-core-discord for serious music bots because of how error-prone they are to streaming audio (a lot of the time the stream aborts)
if you're making a proof of concept they're fine, but otherwise I'd recommend youtube-dl (the music bot example uses this)
One thing, if we use ytdl-core-discord, do we need to specify stream type to OPUS or WebmOpus
??
Opus
Ok
Ray Parker Jr. is playing on my server!!!
Ghostbusters
🎉
🎉
I'll look at youtube-dl but this works for now
thank you, thank you
Uh youtube-dl looks like a library specifically for downloading files is that the case? Isn't that overkill and potentially a lot of overhead? I'll read more but it already looks like it runs on your server so I'd have the Windows version during testing and a Linux install in production. That seems like a lot of work. Thanks for the pointer though.
No problem, it can actually be used to stream the video files too rather than download
okay
What happens when maxMissedFrames is reached?
and is it possible to set the bitrate?
Anything I can do about this? Or that's that
I got face slapped by the error aborted few times
Nvm, just saw the new example, and youtube-dl used, maight try later
the player stops
resource.encoder?.setBitrate(48000)
@vocal valley The ytdl-core-discord gives us a readable stream, then why we need to pass it through CreateAudioResource ?? Can we pass that directly to player.play ??
Nope, a player only plays audio resources. Creating a resource from an Opus stream doesn't pass the stream anywhere else though, it just wraps the stream as it is, so performance isn't made any worse
I did a research, please let me know your thoughts : https://github.com/discordjs/voice/discussions/123
i will take a look later today
although i am fairly sure if it is not being destroyed, then it is due to ytdl-core
🔔 v0.4.0 has been released https://github.com/discordjs/voice/releases/tag/v0.4.0 🔔
I also agree to this
in docs i saw <VoiceConnection>.subscribe() is let the AudioPlayer can play the stream. but in the djs/voice's "Hello World" i saw it did player.play() first then do connection.subscribe(). Why?
to be honest, it does not matter too much about which way around you do it
doing it a little earlier than .subscribe() means that your audio stream starts to be downloaded faster, so there's less time to wait before actually playing
if you do it too far in advance, depending on where the stream is coming from, it might have disconnected or exited
so in that case it is acceptable
yep, that particularly audio source is fine to buffer in advance
and also we're assuming the user will run the example quickly after starting the bot
is there any event emitted when the resource is finish playing?
the player transitions to Idle when it finishes playing
use this :
player.once(AudioPlayerStatus.Idle, () =>{
//Player Ended
})
player.on('stateChange', (oldState, newState) => {
if (oldState.status !== AudioPlayerStatus.Idle && newState.status === AudioPlayerStatus.Idle) {
console.log(`Finished playing ${oldState.resource.metadata.title}`);
}
});
(since Idle is the only state of an audio player that doesn't have a resource, the above works nicely)
oof okay i think i got it
so both this code works
🎉
Yes
oof nice thx for helping
np
I have tested my 2nd code on a loop of 15 minutes and I didn't face any memory leak issues 🙂
And the music that I play now (2nd code) is soo good and without any disconnects (Tested on local PC)
wait so the creatAudioResource() can have a youtube link as parameter
No
One thing, I want to ask , I can get yt-stream link in the format
container: 'webm',
codecs: 'opus',
So Can I use StreamType.WebmOpus while creating audio source in this case ??
yep, you should be able to in this case
wait
It is a link and not a file
if you are passing a link, it will get passed to ffmpeg and turn into an Ogg opus file automatically
Thanks
Np, it will be a little bit worse performance-wise than compared to using youtube-dl
Since it converts the stream for no reason
I got a very good performance with it with no disconnect issue
If it works then it's good I guess, even in that case the performance penalty shouldn't be too much since it's just changing the container of the file for you
oh i see that we can got the audio file link we ytdl
Yes 🙂
But in my case, I think I got more performance with StreamType.Opus than StreamType.WebmOpus. With webmopus, stream lags a little but with opus, there was no lag at all
If you are using a link, the stream type is ignored
LOL
since create resource function will automatically use the correct format to understand what ffmpeg gives back 😅
Have you updated this on npm ??
It should be released, yep
npm i @discordjs/voice is installing 0.3.1
Not 0.4.0
But I managed to install with npm i @discordjs/voice@latest
have all these random crashes been taken care of? i just updated and it looks like im not getting them anymore?
What type of crashes ??
like the thing would stop working on ytdl
nvm, it still gets them
ytdl is broken, so don't ask for help here
yea this is a ytdl-core issue, not a /voice issue
The music bot example has been updated to use youtube-dl instead, which doesn't have the "random crashes"
Any idea or direction if I wanted to do repeat function/command
to replay a song?
yeah
make a new audio resource from the same song, and then play that again
roger, will look into the documentation, btw any plan making the documentation more friendly like discordjs?
at the moment i can't do much about the API documentation (we are planning on upgrading our doc generator to work with typescript), but I am planning on writing more overview documentation, e.g. like https://deploy-preview-595--discordjs-guide.netlify.app/voice/ and adding more examples
https://github.com/Ayeven/discord-musicbot I just published the initial commit yesterday, not sure can contribute as example or not
Hey again @vocal valley, I just found out that, for some reason, the memory leak doesn't happen on windows but does on linux. I have tested it multiple times with same code and nodejs version on 2 windows machines and 2 linux machines and I wish if anyone can reproduce this
is this when using ytdl-core?
yep
could you try the latest example that uses youtube-dl instead?
I tried it on linux and it was leaking as well, but slowly because I didn't pass a highWaterMark
🤔 thats interesting
on windows I can literally see the stream getting garbage collected
are you running the example as it is? or did you make changes
as it is
and how do you know that it is leaking exactly? does the youtube-dl process stay alive after the song has finished playing?
I was monitoring process.memoryUsage, on windows, when I skip a song it goes down to the idle usage but on linux it just keeps piling up
ok after you skip a song, if you wait a minute or two and then check memory usage again, does it go down?
e.g. for me, i have ~60mb to start,
playing a song takes it to about 70mb
skipping takes it to about 80mb but then it drops back down to 70mb
and then when it finishes, after a few seconds it goes back to ~60mb
Damn you just took the example, compiled it to JS, and slapped it into a repo :D
I'm not sure what the difference here is, compared to just looking into the example folder. You didn't even bother double checking removing the safety checks the typescript compiler adds.
Yeah, the subscription and track is from example
let me try this, I was trying with a lot of songs queued up so when I skip it plays the next one but I instantly check the memory and I could see it resetting to 60-70. I will try finishing the queue now
ok 👍
sometimes it just takes time for GC to kick in
It never does
if after skipping/stopping and some time it drops back to 60/70, it means that there isnt a memory leak
could you try this:
$ node --expose-gc yourbot.js
and then whenever a song finishes, can you run global.gc()
if this reduces your memory usage, it means it's not a memory leak
a memory leak means you constantly gain
its as simple as that, stop checking your memory all the time lmao
if you go from 50 to 100 to 80 to 120 to 50 to 80 to 100
thats not a memory leak
You also need to test a considerably longer time for this to establish to be a memory leak
just so we are on the same page for example
this isnt a leak
That IS what I'm saying, on linux it never does down, only gaining
Over which period of time?
And yeah thats fine, I just want us to be on the same page. because people claim something to be a memory leak rather fast around here
and its increasingly annoying to deal with that when they instantly jump to conclusions
I'm just saying that is behaves differently on windows, when I skip a stream it instantly gets gc and never does on linux
how long is never
days
is this on a rather big public bot
or some test bot on 1 guild
it doesnt reset when I stop the player, only when I override the stream
both
what do you mean by override the stream
I think, my code will fix his errors 🤔
maybe but he says he is also getting this issue with youtube-dl
this, aka skipping
As I ran that code over 15 minutes and memory was still at 60
ok, so when you do this, memory goes back down? but not when you call .stop()?
yup, It only frees when another stream replaces it
so if a song naturally comes to an end, and then you play another song after, the memory from the first song isnt freed?
but if you enqueue a song while one is playing, and then skip, it does get freed?
it is freed
I thinks it's a @discordjs/opus issue but not sure
🤔
You aren't making sense
so under which circumstance is it not freed
It's never freed unless I play another song, which resets the memory and goes back up at a certain limit (120mb for me)
that doesn't sound like a memory leak then
since it does go back down
Yup
That's not a memory leak
yeah that's what I am saying! on linux it's piling up
just try to reproduce this
so on windows, this happens
So you mean ytdl has no garbage remover right .
and on linux it keeps going higher and higher and doesnt come down at all?
exactly
ok, you're using the youtube-dl example right?
ytdl-core-discord
Oh LOL
XD
ok,
one sec let me do something
with highWaterMark: 1 << 25 to make the leak clearer
We were thinking about youtube-dl whole time and he is using ytdl-core-discord 😂
we just need to stop recommending this lib

using highWaterMark is not a good solution
ok so
without it the stream aborts early and the player stops
can you go to node_modules/ytdl-core/lib/index.js, and around line 180, change stream._destroy = () => ... to this:
stream._destroy = () => {
console.log('destroying stream');
stream.destroyed = true;
req.destroy();
req.end();
};
using the youtube-dl it is within expected memory usage, on raspi pi 4 8GB
and then try running your bot again, when you skip or whatever on linux, it should say "destroying stream"
it works but only because it essentially downloads up to 33MB of the video
so it's not really streaming, more of "download this entire video into memory as quick as you can and then stream that"
the problem is when you have longer videos, e.g. that are more than 33MB
it's same thing 🙄 the issue is likely with opus
hydrabolt, did you checked my discussion yet ??
highWaterMark is more of a bandaid fix, rather than a fix of something wrong in ytdl-core's reconnect logic i assume
not yet
i am sure the opus library does not have mem leaks lol
what if I stream 10 hours long videos
can you try this first
that will help us narrow down where the error is
thats when the highWaterMark fix will probably no longer work
ytdl-core never ends stream when we use skip command, it still plays that stream in background
i just want to be sure that is what is happening,
ok
how are you so confident in this
have you tried with opusccript
the opus library doesnt even allocate memory, so how would it keep something in memory
lol
lol
IDK, just the 2 different behaviors made me think that, since it needs to be compiled or something
so you dont know
just say that instead of pointing the finger somewhere else
you should try youtube-dl or opusscript
He could even manage that without youtube-dl and opusscript also
but please also check this first @spare snow 😩
I'm on it
@vocal valley good news, on windows it does free the memory when I stop the player, just needed some time. (I just found out about the windows thing don't roast me)
but still, on linux it never does
ok but on linux, does it print out the destroyed thing
yeah it does
I just stopped the player and I'll wait to see if it gets gc, it's sitting at 150mb already
I hate my ocd, I just could ignore it..
can you also try this
nothing got collected
how high can you get the memory to go on linux, could you test that
about this memory thing, is this only affect ytdl-core? Because using youtube-dl, an it behave like it supposed to be
memory().heapUsed btw
i believe so? but even then i'm not sure if i can reproduce it with ytdl-core myself
My short test earlier. The first song is quite long, 32min
Hello, sorry for the dumb question, if I'm using lavalink, do I still need to install this package or its dependencies?
Lavalink and this voice api are different
If you have lavalink, then don't install this
the lavalink takes care of it on its own right
yes
i see thanks
using youtube-dl or ytdl-core ??
youtube-dl
it keeps adding up with each new player
I think, I had a fix with ytdl-core itself, but I don't know whether hydrabolt will accept that or not
260mb for 3 players and so on..
ytdl-core always faceslap me with econReset or something those line
So it is due to youtube-dl memory only I guess
I have a better fix, no need to use code like this ytdl(url)
wanna try ??
sure, though it will be later or tmrw
half gaming, hafl discord atm
Ok wait
function filter(format) {
var results = []
format.forEach((ele) => {
if(ele.codecs === 'opus' && ele.container === 'webm' && ele.audioSampleRate === '48000'){
results.push(ele)
}
})
return results
}
//Below Code : Under message event
let connection = await join_vc(message);
const info = await ytdl.getInfo(<your - url>)
let stream = filter(info.formats)[0].url
var source = createAudioResource(stream, { inputType: StreamType.Opus , inlineVolume : true })
var player = createAudioPlayer()
player.play(source)
connection.subscribe(player)
@spare wave
also each player adds more memory with each new song btw 
Can you try above code ??
and then tell me if memory still goes up or not
What node.js version are you running
@vocal valley 1 more issue with youtube-dl
14.17.0 and 15.6.0, same results
This seems fine to me
I'll give it a shot
Yep, either try Youtube-dl example or the example above
well, yeah, it climb up because the song is long
and then, once a song ends or you've skipped a few songs
Can you see how many ffmpeg (for the example @carmine timber posted) processes are running, or how many youtube-dl (for example on repo) processes stay running
I already tried this, no youtube-dl processes stay running after the song is skipped/end, and it didn't spawn any ffmpeg cuz i'm using opus type
hm that is good, it would suggest there isn't actually a memory leak
So this means that youtube-dl requires high usage of memory ??
No
If the process was alive after the song finished, that would suggest there's a memory leak
Well, Windows says otherwise.
But if it's working as expected I'll just move on
just dont use ytdl-core
just see if your process runs out of memory after long usage
if it does, then you probably do have a memory leak
It also could just be d.js cache build up
a lot of factors here
Are you irritated with ytdl-core ??
Windows and Linux don't manage memory the same way
You will always encounter differences between the two systems (even for how node allocates/free memory itself)
As long as it does not grab more and more memory over time it's fine
Make your bot in C if memory usage is a critical point
Idk about crawl but I am for sure
the developer of it has tried their best to fix it for discord.js so props to them
its time to start writing voicelink
But it still doesn't work great with d.js and people attribute their ytdl errors to discord.js
But is there any fault, the way I am streaming content ??
I think it's ok to use FFmpeg? but honestly I just trust youtube-dl to download the video cause that's why it exists
Oh
maybe there is some reconnection logic youtube-dl has that ffmpeg doesn't
But you can add reconnect args in ffmpeg also
I don't understand what it is, but there is no sound.
New Voice API or old ??
New
Code plz
Example
Maybe it is something related to your internet connection problems
Likely to be binary data, so not designed to be printed by definition which explains those characters
Show code
It just failed to connect to your voice channel
No, it's connected to a voice channel.
Why would it print what it seems to be audio data then, also you'd get an error from discord.js at some point too
Can you send the full output of the console to us
@vocal valley Can You add some ffmpeg args in this : https://github.com/discordjs/voice/blob/main/src/audio/TransformerGraph.ts
-reconnect 1 -reconnect_streamed 1 -reconnect_delay_max 5
It would be great
These are reconnect args which allow ffmpeg to reconnect once disconnected by itself
Just tell me if you will add or not
I think I will
Thanks
That's all I could find.
.......��6����ވ;^E_���yؙ_ǝF���> �5�Ǵ����n�:��r�7⟴�չt�#�F��������L,�J))��=�@��Fq
��������1�G�?3�����j��Db�WW2#l�-pRN�̬{%'c�ue�<�1`Ƿd��xy�����ű�LV/y��-�V������h
cH�+ä����@�������T�������h������u��'ġ��|���
at makeError (/Users/penguingl/Documents/example/node_modules/execa/lib/error.js:60:11)
at handlePromise (/Users/penguingl/Documents/example/node_modules/execa/index.js:118:26)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
shortMessage: 'Command failed with exit code 1: /Users/penguingl/Documents/example/node_modules/youtube-dl-exec/bin/youtube-dl https://www.youtube.com/watch?v=VBKNoLcj8jA -o - -q true -f bestaudio[ext=webm+acodec=opus+asr=48000]/bestaudio -r 100K',
command: '/Users/penguingl/Documents/example/node_modules/youtube-dl-exec/bin/youtube-dl https://www.youtube.com/watch?v=VBKNoLcj8jA -o - -q true -f bestaudio[ext=webm+acodec=opus+asr=48000]/bestaudio -r 100K',
escapedCommand: '"/Users/penguingl/Documents/example/node_modules/youtube-dl-exec/bin/youtube-dl" "https://www.youtube.com/watch?v=VBKNoLcj8jA" -o - -q true -f "bestaudio[ext=webm+acodec=opus+asr=48000]/bestaudio" -r 100K',
exitCode: 1,
signal: undefined,
signalDescription: undefined,
stdout: `\x1AEߣ�B��\x01B��\x01B�\x04B�\bB��webmB��\x04B��.......
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 0,
message_reference: [Object],
attachments: undefined
},
files: []
}
}

huh
could you try running your bot and piping it's output to a file?
node bot.js > debuglog.txt
and then once the error occurs, send the debuglog.txt? annoyingly the top of the error is cut off
but doing this allows us to capture the whole thing
that is so odd 🤔
ill take a look at the youtube dl npm wrapper we use maybe there is an issue there
what node.js version are you using?
and are you on windows?
@grim fulcrum what do you get if you run this in a terminal:
/Users/penguingl/Documents/example/node_modules/youtube-dl-exec/bin/youtube-dl --version
node 16.3.0
mac
ok, can you try this:
2021.06.06
/Users/penguingl/Documents/example/node_modules/youtube-dl-exec/bin/youtube-dl https://www.youtube.com/watch?v=VBKNoLcj8jA -o - -q true -f bestaudio[ext=webm+acodec=opus+asr=48000]/bestaudio -r 100K
what happens if you run that?
...����(̳�i����U�`.6�3��V�
ERROR: u'true' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:true" ) to search YouTube
� ճ��[���Th��v��...
ok, what about this:
/Users/penguingl/Documents/example/node_modules/youtube-dl-exec/bin/youtube-dl https://www.youtube.com/watch?v=VBKNoLcj8jA -o - -q true -f "bestaudio[ext=webm+acodec=opus+asr=48000]/bestaudio" -r 100K
it might still give you nonsense in the console
but if there's no error it's good
same error
ERROR: u'true' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:true" ) to search YouTube
🤔
oh
/Users/penguingl/Documents/example/node_modules/youtube-dl-exec/bin/youtube-dl "https://www.youtube.com/watch?v=VBKNoLcj8jA" -o - -q true -f "bestaudio[ext=webm+acodec=opus+asr=48000]/bestaudio" -r 100K
now?
what are you passing true here for?
isnt -q enough to activate silent mode
ohh shit

ERROR: u'true' is not a valid URL. Set --default-search "ytsearch" (or run youtube-dl "ytsearch:true" ) to search YouTube
thats a youtube-dl-exec bug crawl is right
on linux it doesnt pass the true 🤔
i mean it might not be wrong
I just thought its unneeded
you are right i think
But he is on windows right ??
on linux, running youtube-dl-exec with options {q: true} just yields -q iirc
on windows it must be doing -q true

Mac
Oh
hmm
@grim fulcrum try this:
change line 52 in examples/music-bot/src/music/track.ts:
- q: true,
+ q: '',
yeah I tried it on debian
removing the true seems to work
thats so odd
it converts the args object into a list in JS, i thought that'd be platform-independent
Works
might just be a quirk in the youtube-dl args parser
not expecting a value for -q so it poops itself
on ubuntu, q:true all working good
🤨
guess i'll go with empty string
works in both
I only pasted the command from above, didn't try the actual bot
so theres that
actual bot here
what q parameter do though? have not read the youtube-dl docs
means "quiet", stops youtube-dl printing unnecessary info
changing q:'' work too for ubuntu
@carmine timber i decided against adding reconnect options to ffmpeg at least for now since they might not be the optimal values for each user
discord py Voice API has those args in ffmpeg. They will never affect and stream quality or playback. They are used just for reconnecting stream and nothing else
should i only have discordjs/voice or do i also need to install discord.js for it?
i understand that, but even if we look at https://github.com/discordjs/voice/issues/117, it seems that reconnect_delay_max=5 was not enough for this user here
(currently getting the error that the module dosen't exists)
i can't plan for every user's setup, instead they should do this themselves
the /voice library doesn't have to be used with discord.js, but in all our examples, we use discord.js
i somehow always get the error Error: Cannot find module '/home/container/node_modules/@discordjs/voice/dist/index.js'. when i try to start it
did you run npm run build?
wait
did you install the library from npm?
yes
can you do ls /home/container/node_modules/@discordjs/voice and send the output here?
only this is in the folder
did u run npm build before the publish hydra 
🤔
i did
i am sure i did
on my local pc i have the folder node_modules but nothing more
when i run npm i @discordjs/voice i get the dist folder
so im not really sure what's going on here
this is only what i get when i run it in the folder
and npm says it installed it without any errors
Just increasing the delay to 300 and at least add in the files.
but that is a subjective change
300 is sweet spot for most users
some people might just want the resource to die after a few seconds of delay
not all users will think 5 minutes is acceptable
Can you add something like max_reconnect_delay option in createAudioResource ??
Default to be 5
just do it yourself lol
Then that's ok for all users
i'll consider it but that is the same reason i removed seek from createAudioResource
because it only applies if you use ffmpeg
createAudioResource is not guaranteed to use ffmpeg
Oh
id hate to have an option forced onto me
especially because I never had any voice connection problems ever lol
the ffmpeg option we have so far does the bare basics of just turning the stream into an opus stream, that's all
so it would be totally useless for me
after doing npm remove discordjs/voice and redownloading it i now got the dist folder but somehow not on the host machine 
bruh
sounds like a cursed setup

that sounds like you install from github
oh yeah
npm i @discordjs/voice
the @ is important
its what i did
@vocal valley Did you check out my research ??
lol
XD
i removed it and redownloaded it with npm
Try typing this npm i @discordjs/voice@latest
now i got a dist folder on the host machine 
Try typing npm config list
and show me result
i sadly can't run commands on the host machine, its just allows me to connect with FTP and install npm packages
(as its a docker container runned by Pterodactyl)
So where do you want to install voice module ??
i was trying to install it on the host machine but only gave me the error in the reply
Do you have npm in windows ??
it seems like this fixed it for me as it dosen't say that it cant find the module anymore
🎉
now i only need to rework some stuff because the example is in ts and im using js 
Can you create something like extra_options option in CreateAudioResource ? If ffmpeg is used then, extra args will be used otherwise no use of that
ExtraOptions will be just an extra argument that users want to supplement in ffmpeg.
Just like you supplemented extra args while not touching basic args for ffmpeg : https://github.com/discordjs/voice/issues/117#issuecomment-860081673
can i just tsignore
or it will make me some problems in future
can you update your @discordjs/version
should be fixed on 0.4.0
but that leads to inconsistency
e.g. people will then think the stream they pass will have reconnect set for them
if people want to use custom FFmpeg arguments, they should just spawn their own FFmpeg instance, it's not too hard
and at least then they are being explicit about using FFmpeg
thanks i updated it
Where’s the documentation for “new-voice”?
Anyone can help me?
Are you sure it'll be executed in a guild?
And not a DM
The code
Mmh you should make them required, not optional I guess
Change this to something like :
joinVoiceChannel({
channelId: voiceChannel.id,
guildId: guild.id,
adapterCreator : guild.voiceAdapterCreator,
selfDeaf : true
})
They're using typescript, it's often unhappy when params are optional and you try to use them where they're not optional
will joinVoiceChannel also support stage channels?
yes
It already does @proud spindle
probably just me needing an update, thanks!
oh wait, I meant the createDiscordJSAdapter in the example
Ohh
The type needs updating to include stagechannel, but besides that it will work
Great, thanks!
hey
please client for voice code
if you mean examples there are some at https://github.com/discordjs/voice/tree/main/examples
no no i mean client like this'
const Discord = require('discord.js');
const client = new Discord.Client();
but for voice
I don't think client changes 
No, you use your existing client from djs with the new voice package. Apart from some methods, nothing really requires changes
am trying to join my bot an voice channel

thx broo
thats the client true?
This library does not have a client.

Any good tutorials or sources on how to use this thing? I don't fkin understand it... My smol brain
There’s the guide linked above and examples linked in the pin
examples are in ts... And the guide just straight up sucks, or I'm stupid
Probably the second one
Just ignore the types and it becomes js
When you ignore the types it becomes just script... Ok ok jk, I'll try looking at the examples
const { NoSubscriberBehavior, StreamType, createAudioPlayer, createAudioResource, entersState, AudioPlayerStatus, VoiceConnectionStatus, joinVoiceChannel } = require('@discordjs/voice'); When using this, this doesn't work const player = createAudioPlayer(); It says it's not a function and I fully understand that it's not. I think the problem is that in the example it's import, because of ts, and here it's different. How to change it?
Is there any way to invite bot to voice channel on v13? Previous it works like message.member.channel.join() but on v13 it doesn't. I'm not ready yet to use new voice library.
Nope
V13 already removed all that code
oh damn
okey thanks to answer
Do you have @discordjs/opus and libsodium-wrappers installed?
const Discord = require('discord.js');
const client = new Discord.Client();
(message.content.startsWith('!join'))
voiceChannel.join()
.then(connection => console.log('Connected!'))
.catch(console.error);```
no respone
whats the problem?
Voicechannel ist Not defined
how??
const Discord = require('discord.js');
const client = new Discord.Client();
if (message.content.startsWith('!join')) {
let voiceChannel = client.channels.cache.get("VC ID");
voiceChannel.join()
.then(connection => console.log('Connected!'))
.catch(console.error);
}
Also you forgot an if
wow
And
then?
So, I tried looking at the docs about AudioResource, but I am still confused.
const resource = voice.createAudioResource(play);
play is a ReadableStream, but It throws this error:
"stream.on is not a function"
You forgot the client.on("message“) @covert sky
what if client.on("message“) not found@upper storm
Uff

const Discord = require('discord.js');
const client = new Discord.Client();
client.on("message", async message => {
if (message.content.startsWith('!join')) {
let voiceChannel = client.channels.cache.get("VC ID");
voiceChannel.join()
.then(connection => console.log('Connected!'))
.catch(console.error);
}
});
Her you go
Read the docs bro
This doesn't work in v13 anymore.
🤔
V13 is Released?
no but people in here are using it
its the "new" voice channel
Yeah Ik say this to him 😂
Where do you get play from?
no respone again 
okay
It is a ReadableStream from a buffer
@discordjs/opus and libsodium-wrappers installed?
@grim fulcrum yes
Yeah, i dont know. This is weird
Can you show me what is play defined ??
Your readable Stream doesn't have events support, so it is throwing this error
Oh I'm just using Readable.from(buffer), how would I give it events support?
What exact code are you using ??
show me
In not on my PC right now, I'll show you later.
To create a proper readable stream, you need a code like fs.createReadStream('<your file>')
Ok np
It has to be a buffer though, not a file
You can use buffer also
I just gave an example
Can you show me node_modules/@discordjs/voice/ folder ??
Can someone help me? I uploaded my bot to my host, but it doesn't play there, on my computer it does
Any error on host ??
Nop
Can you run this on your host ??
const { generateDependencyReport } = require('@discordjs/voice');
console.log(generateDependencyReport());
It looks like this on the voice channel, but no audio
Ok
Run this
Wait a minute, I'm using the docker, I'll publish it real quick here and I'll send it
Ok
wtf, My dependencies updated and now it's giving an error here
What d.js version are you in
^13.0.0-dev.1ac9a2eb5bfef6d009de7c54d3fac5e3d4a5afdc
Type this on host, npm i discord.js@dev@latest
But now is on my pc the error
Type this in pc also
ok
wait
@carmine timber same error
Can you show me full code of join vc ??
async join (): Promise<VoiceConnection> {
const connection = await joinVoiceChannel({
channelId: this.voiceChannel.id,
guildId: this.guild.id,
selfDeaf: true,
adapterCreator: this.guild.voiceAdapterCreator
})
await entersState(connection, VoiceConnectionStatus.Ready, 30e3)
return connection
}```
Does code run ??
I can't even compile or anything, forever on this error
Can you console.log(this.guild) ??
That's weird can you try to use npm i in latest discord.js commit
He tried it
read above chats
then comment
@carmine timber
On the guild obj? Nop
same on npm
Ok
Can you reinstall discord.js dev ??
ok, wait
I'll clear the yarn cache first
Ok
Try reinstalling it with npm
ok
Okay, maybe I'm unlucky, add an error and double up
Try restarting VS
Ok
Fixed ??
Yes
now i'm going to test on my host
😄
with this
Yes
It will tell me about your dependencies that you have on your host
put it in the bot's ready event, is there a problem?
Your audioplayer is having issues while sending packets to voice channel
and how do i fix?
Host somewhere else
im not hosting it anywhere
only on my pc
I know
This is your internet issue
no? i have really good internet
Then try restarting the bot
ight i restarted the bot
now he joins
then leaves
no error
Joining code ??
In joinVoiceChannel, add debug : true
and then after that add a line queue.connection.on('debug', (data) => {console.log(debug)})
okay
@carmine timber ```
Core Dependencies
-
@discordjs/voice: 0.4.0
-
prism-media: 1.3.1
Opus Libraries
-
@discordjs/opus: 0.5.3
-
opusscript: not found
Encryption Libraries
-
sodium: not found
-
libsodium-wrappers: 0.7.9
-
tweetnacl: not found
FFmpeg
-
version: 4.3.2-static https://johnvansickle.com/ffmpeg/
-
libopus: yes
--------------------------------------------------```
You don't have tweetnacl. That's interesting 👀 , since djs uses tweetnacl by default
Does it have something to do with my Dockerfile?
NO
I'm using node:14-alpine
Try to play song again
Same thing, it enters and stays like that, but no audio
WAIT
WTF
I write in pt
What exactly are you trying to play ??
it printed a lot of json stuff
is a webradio link here in Brazil, can I send it here?
Show me
Is that link of mp3 or live audio ??
Live radio
Can I send it for you to see?
DM me the link
I changed the stremtype so it's all right, the bot on my computer plays normally
Show me playing code also
async play (url: string): Promise<AudioPlayer> {
const player = createAudioPlayer()
const resource = createAudioResource(url, {
inputType: StreamType.WebmOpus
})
player.play(resource)
await entersState(player, AudioPlayerStatus.Playing, 30e3)
return player
}```
Try to change streamtype to opus and then check
ok, wait
I can't see any disconnect logs
StreamType.Opus, right?
it disconnects if there is no song playing
that's in my code
like if there is no song playing it will disconnect
and if i remove the disconnect part it will just play nothing
yes
Do this error still comes ??
nope
no error apart from the debug part
So what's your issue now ??
it doesn't play anything
Remove debug code BTW
ight
In my pc works, i'm sending to host
Ok
What is your issue now ??
.
Show me playing code
wait i think i know what is the problem
What is it ??
First of all, ytdl has memory leak issues and secondly, I will choose ytdl-core-discord at any point of time
ytdl-core has many issues
i use discord-ytdl-core
@carmine timber nothing 
the filters are the problem i think
That module also uses ytdl-core only with some extra ffmpeg args.
Try to use ytdl-core-discord
What if I install this tweetnacl when I build it?
Try it
Did it work ??
It's building
Ok
Just asking, why do you prefer ts over js ??
it's because i'm learning to program with ts, for me it was a mess, but now it's starting to fit
@carmine timber ```JS
Core Dependencies
-
@discordjs/voice: 0.4.0
-
prism-media: 1.3.1
Opus Libraries
-
@discordjs/opus: 0.5.3
-
opusscript: not found
Encryption Libraries
-
sodium: not found
-
libsodium-wrappers: 0.7.9
-
tweetnacl: 1.0.3
FFmpeg
-
version: 4.3.2-static https://johnvansickle.com/ffmpeg/
-
libopus: yes
--------------------------------------------------```
In my host
and again, nothing
Host is which version of linux ?? like ubuntu, desbian, centos ??
Alpine
does ytdl-core-discord have ffmpeg args
No you need to separately pipe ffmpeg args
@carmine timber I'll try without Alpine
oof, idk
Try running sudo apk add ffmpeg
Then for testing, try running ffmpeg -h
ok
It worked ??
Yes
i tested now
without alpine works
Oh
That means alpine is your problem
Is it possible to use this module on v12?
yes
I've been trying to solve this for hours, thank you very much @carmine timber 
😄
You need adapter file if you want to use it in v12 : https://github.com/amishshah/discord-radio-bot/blob/feat/upgrade/src/adapter/adapter.js
This is not place to ask, but the error says that you are converting a null to a string
Which is not possible
Show me what is there in play.js at line 55
are you using any message collector ??
Yes that's what's causing you the issue
Can you show me the message collector code
??
Where is the message(used in client.player.play) defined
??
You should have used message.content, I guess
You are playing a message class
Not sending any string
wait lemme show you my play function
it uses the message so it gets the message guild's queue
ok
ADS
WTF
@keen plaza Ban him
For me personally, I can't find any errors. Maybe ask more knowledgeable person
ight
thx for the help tho
😄
Can new-voice listen to more than 1 user at a time?
I think you can
Voice receive is not implemented yet
It is there in New Voice API
No
That’s far from done
I know that
But it is present
That's what I am saying
It is not complete but it is present
Doesn’t really matter if you can’t use it
its present but awful
Did you checked my research ??
I did, it is quite similar to ytdl-core-discord but there are a few pain points
- some videos may not have an opus 48000 format and will have to be transcoded (not handled by your example code)
{ inputType: ... }is ignored, so I would remove inputType
really it does the same thing as youtube-dl, except it has no fallback in case there is no opus/48000Hz format
Are you going to remove inputType from createAudioResource ??
i guess i can update the typings to show that inputType is not allowed with a string-based resource
Can I play m3u8 format audio?
yes, via ffmpeg
all you'll need to do is install ffmpeg and it should just work
oh good
Oh I see
BTW, you are also defining that you need 48kHz opus encoded sound in youtube-dl
yep but there is also /bestaudio fallback
in case that the opus format doesnt exist
Oh
What is function of entersState ??
I have opus, but don't have libsodium-wrappers
Installed it, same thing continues
Reinstall @discordjs/voice
You don't have discord voice module
Try typing this npm i @discordjs/voice@latest
is there a way to go forward/backwards in audio while its being played
like skip some seconds
?
Then you need to pass a ffmpeg instance to audio resource with seek options
hello, i keep getting this error when I try to play music FFmpeg/avconv not found!
Are you on windows?
Yes
Do npm i ffmpeg-static
Did that
Nothing changed
Mmh
Idk
Are you using the new voice module
Yes
how does your npm get so corrupted

anyway i fixed it by clearing cache
but still
ffmpeg/avconv not found
can you use generateDependencyReport and send the output?
example of using it is in the guide in the pinned messages
@vocal valley
yep
idk what to say to be honest, if it's not finding ffmpeg it must just not be installed in the right place
where are you installing it
i installed it using npm install ffmpeg
is it in the example directory?
no...?
i used npm install so i assume in
node_modules
but where did you run the command
in my bot folder
You need to set environment path on windows
npm i ffmpeg-static, right
Without that nothing is possible
ok, in your bot folder do this in a terminal:
but it worked like a few hours ago
node
> require('ffmpeg-static');
what gets printed
Type ffmpeg in cmd ??
Type ffmpeg in cmd
how odd 🤔
See not set
but thats not the issue
if ffmpeg-static is installed, it should get resolved
but why did it work like 5 hours ago 🤔
That's the issue
in node_modules/prism-media, is there another node_modules folder?
lemme check
🤔
im really not sure why it's not resolving, all prism does is require('ffmpeg-static')
so if you can require it from your bot's root directory, it should work in prism too
Go to this PC and then right click --> Properties -->Advanced System settings --> Enviournmental Variables --> Path --> click on NEW and add the path where you have ffmpeg.exe
i tried requiring media-prism using cmd and it says module not found
wait
@wise anchor Try this
oh
that works
ok
that will fix it yes, but it still doesnt explain why the module isnt getting imported in node.js
That's an issue with module, as I have to separately install ffmpeg in Linux and add path in Windows
umm where is the ffmpeg.exe if i installed it using npm
Go to node_modules/ffmpeg-static/
oh
now?
WTF
is this your ffmpeg-static
??
yes
wait
i ran node install.js
now it appeared
Yes
now it detects it
Now try restarting bot
ight
How to know if what the player is playing has ended or not?
is it done by player.on(AudioPlayerStatus.Idle, () => {}
yes player.on(AudioPlayerStatus.Idle, () => {})
how can i get the time that passed since it was playing
like let's say i have a song of 3 mins
i want to get the current time that it is at
ty
no, javascript is for losers
just remove the types and its javascript
not that hard
Ummmm
So
When I ask it to join the stage
it joins as a listener
The bot
How do I make it join as a speaker?
C:\Users\HP\Documents\GitHub\Sharkymusic\node_modules\@discordjs\voice\dist\networking\Networking.js:413
secretbox.methods.close(opusPacket, connectionData.nonceBuffer, secretKey),
^
TypeError: secretbox.methods.close is not a function
at Networking.encryptOpusPacket (C:\Users\HP\Documents\GitHub\Sharkymusic\node_modules\@discordjs\voice\dist\networking\Networking.js:413:35)
at Networking.createAudioPacket (C:\Users\HP\Documents\GitHub\Sharkymusic\node_modules\@discordjs\voice\dist\networking\Networking.js:397:53)
at Networking.prepareAudioPacket (C:\Users\HP\Documents\GitHub\Sharkymusic\node_modules\@discordjs\voice\dist\networking\Networking.js:321:37)
at VoiceConnection.prepareAudioPacket (C:\Users\HP\Documents\GitHub\Sharkymusic\node_modules\@discordjs\voice\dist\VoiceConnection.js:282:33)
at C:\Users\HP\Documents\GitHub\Sharkymusic\node_modules\@discordjs\voice\dist\audio\AudioPlayer.js:426:54
at Array.forEach (<anonymous>)
at AudioPlayer._preparePacket (C:\Users\HP\Documents\GitHub\Sharkymusic\node_modules\@discordjs\voice\dist\audio\AudioPlayer.js:426:19)
at AudioPlayer._stepPrepare (C:\Users\HP\Documents\GitHub\Sharkymusic\node_modules\@discordjs\voice\dist\audio\AudioPlayer.js:398:22)
at prepareNextAudioFrame (C:\Users\HP\Documents\GitHub\Sharkymusic\node_modules\@discordjs\voice\dist\DataStore.js:71:31)
at audioCycleStep (C:\Users\HP\Documents\GitHub\Sharkymusic\node_modules\@discordjs\voice\dist\DataStore.js:56:5)
What is this error?
I tried to make it join a stage but it flipped with this message
Plus it joined the listeners
How do I make it join speakers?
Can you install libsodium-wrappers ??
There has been some issues with tweetnacl
Oh jesus
How do I install it?
I think this error got patched in latest PR
This is the latest version of discord/voice, I literally installed it minutes ago