voiceState is undefined
```
client.on('voiceStateUpdate', (oldState, newState) => {
voiceClient.startListener(oldState, newState);
console.log(voiceClient.getUserData(client.guilds.cache.get(guildID).members.cache.get(newState.id)))
})...
Good way to get the progress of the current song?
Is there a good way or do I have to keep track of it myself?
not playing audio
```js
const { joinVoiceChannel, createAudioResource, createAudioPlayer } = require("@discordjs/voice");
const connection = joinVoiceChannel({
channelId: state.channel.id,...
My bot take a lot of seconds to start playing the music
HII
```js
const connection = joinVoiceChannel({
channelId: channel.id,...
No one else can hear my music bot lagging.
Im the only one who can hear my musicbot lagging no one else does, its hosted on the same network im using discord on if that affects anything.
not playing anything
```js
const { Client, SlashCommandBuilder } = require('discord.js')
const { createAudioPlayer, createAudioResource, generateDependencyReport, joinVoiceChannel } = require('@discordjs/voice');
console.log(generateDependencyReport());...
Error FFmpegavconv not found!
This is my first time using this and I'm not sure if I've even done it right,
I'm getting the error
Error: FFmpeg/avconv not found!
from:
```js...when his bot is inside a voice channel, moving others takes about 5 seconds, whilst when it’s not in
there is a very strange bug when my bot is in vocal and that it has to move a member the action but about 5 seconds, whereas when it is not in vocal that but about 30ms
Creating-deleting vc on join-leave error
Im getting this error and it doesnt say where in the code comes from.
Any idea where to look at and how to fix it?
```js
/node_modules/discord.js/src/rest/RequestHandler.js:350
throw new DiscordAPIError(data, res.status, request);...
The package returns the wrong State.
When I use connection.on("stateChange"), it reports
signalling
and connecting
before it joins, but it doesnt signal out ready
when it joins the voice channel. It only reports ready
when you make the bot leave the voice channel. I'm using the latest version published on NPM currently.Bot don't plays audio
pls help me
Code:```js
let connection = DiscordVoice.joinVoiceChannel({
channelId: interaction.member.voice.channelId,
guildId: interaction.guild.id,...
join members voice channel
how do i get the currently joined voice channel of sender and make it join and play audio there?
All element play can be inlineVolume ?
my bot can play music with a link (NOT YOUTUBE), with a file or even a stream link from a radio. Do all these elements accept the volume management (inlineVolume) directly with "createAudioResource"?
Won't play any audio
```js
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,...
Where can I find how long an AudioPlayer has been playing an AudioResource?
Using latest version of @discordjs/voice
the closest thing that I found was AudioResource.playbackDuration but that gives the whole length of the resource, not how much has been played and how much is left to play...
Play audio from URL (mp3 stream)
Hey,
I'm currently using djs v14 and djs voice to create an Audio Player playing audio from a mp3 stream. Works fine in general.
However, after several minutes of playing the audio the Audio Player switches to Idle/disconnects without any error.
When I try reconnecting to the stream when it switches to the Idle state it works for another few minutes.
Any ideas?...
Converting opus to *.wav or *.mp3
Hello! I'm trying to receive audio and save as a *.wav or *.mp3 file. There is no documentation for this but I read some messages on discord. I tried a lot but still couldn't make it. After this code, I'm using ffmpeg to convert file. Like this:
```
ffmpeg -f s16le -y -ar 16000 -ac 1 -i test.pcm -ar 16000 -ac 1 test.wav
ffmpeg -f s16le -ar 48000 -ac 2 -i test.pcm test.mp3
ffmpeg -f s16le -ar 44.1k -ac 2 -i test.pcm test.wav...
Checking if a connection is already established.
Hey there, I was just wondering if I should be checking if the bot already has an established connection before running the below code:
```js
joinVoiceChannel({
channelId: channelId,
guildId: interaction.guild.id,...