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({...
Bot plays audio sped up
```ts
const player = createAudioPlayer();
const connection = joinVoiceChannel({
channelId: channel!.id,
guildId: guild.id,...
Bot disconnects after rejoining.
I'm changing vc of my bot but it immediately disconnects after rejoining... how should i fix it ? I have enabled
GatewayIntentBits.GuildVoiceStates Already
Random latency spikes?
Is something not optimized in my code? I'm trying to allow two server vcs to connect (by transferring the audio of one to the other) but sometimes it stops working for about 10 seconds then starts up again.
player not work
```js
try {
const VoiceConnection = joinVoiceChannel({
channelId: newState.channelId,
guildId: newState.guild.id, ...
Voice reqs
I tried to test a tts code and looks like djs vooice requires ffmpeg, i cant download anything rn so im curious if theres any package that i could use as ffmpeg or sum like that
Receiving this error when I'm trying to join the voice call.
Hi,
I'm trying to use the example as used in https://github.com/discordjs/voice-examples/blob/main/recorder/src/,
however it's not working as in it's joining the vc, it's not saying that it's ready, it times out then says ready. Then, it gives me this error, which I don't really know how to fix....

How can I have a "real time conversation" as a bot?
Hi,
I'm trying to pretty much have a real-time conversation with a bot (powered by AI), and I'm trying to figure out how I can really do this.
Maybe I can do it by voice activity (like the green bar) or by sensitivity?
Please let me know for ideas! Would be amazing....
Cant play the same audio resource again
Hello i'm trying to make a bot that plays audio when someone enters the same voice with the bot here is the code
https://pastebin.com/M45Ukbu7
it plays it onve when i enter but does not when i leave and rejoin instead i get this error ...
Error: Cannot play a resource that has already ended.
Error: Cannot play a resource that has already ended.
How to make a slash command allowed to be used in user dms and external servers
Title says it all, I have no clue on how to pull something like that off. Can someone point me in the right direction? Thanks in advance!
Getting this error when booting up the bot.
package.json:
```js
{
"name": "someshit",
"version": "1.0.0",...

How to include silence in vc recording
Iām trying to record a vc, Iām using this and the module mediaplex for the opus encoder:
```js
const listenStream = connection.receiver.subscribe(member.id, {
end: {...
running multiple bots with one script
I tried running about 14 bots with one script and make them join voice channels and tried using worker threads to run each bot on a separate thread and distribute the bots and balance them on multiple cpu cores but but after a while of launching the script some of those bots go offline idk if the cpu can't handle running all of those bots simultaneously or it's just an internet problem can anyone help me understand the problem? Or at least suggest some methods to debug the problem
Voice Typescript error.
I have a command that i did in js back in the day. I dont even know how djs voice works exactly but ik it worked withouth problem.
So here is my code:
```ts
player.on(AudioPlayerStatus.Idle, () => {
subscription?.unsubscribe()...
Seek option removed
In discord.js v12 there was an option to seek the audio stream while playing it like this:
But it seems to be removed, and now there isn't a way to play a stream from a different position....
connection.play(stream, {seek: start})
connection.play(stream, {seek: start})
Trying to record VC but the out file is static
everything works as expect in the console but the out .pmc when converted is only a short clip of static.
How can I record voice from a VC using discord.js?
I want to record voice from a specific voice channel, I already tried to do it many times but didn't find the solution, I either get a slowed down .pcm audio, an unaudible audio, an audio that progressively slowes down or a 1 second long static sound audio.
I'm on Node.js v20.12.2, also I'm coding in TypeScript...
Bot wont talk & no error, how do i debug?
(selected opus tag bc i had to, to post idk what it is)
how do i debug this? since it says nothing in logs and doesnt even light up green
code (voiceConnectionAudioPlayer.player.play(...) is actually ran):
```js...