getVoiceConnection return undefined?

the code returned undefined and my bot is connected to a voice channel
const test = getVoiceConnection(interaction.guildId);
return console.log(test);
const test = getVoiceConnection(interaction.guildId);
return console.log(test);
4 Replies
d.js toolkit
d.js toolkit3y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
nobody
nobodyOP3y ago
[email protected] and node v19.6.1
</> Idris
</> Idris3y ago
it means that there's no voice connection in this guild can you also log interaction.guild.members.me.voice.channelId
nobody
nobodyOP3y ago
I already try it error the object me doesn't have voice

Did you find this page helpful?