discordjs / discord.js

A powerful JavaScript library for interacting with the Discord API
https://discord.js.org
Apache License 2.0
25.49k stars 3.97k forks source link

Adapters in ClientVoiceManager usage. #7842

Closed its-mrarsikk closed 2 years ago

its-mrarsikk commented 2 years ago

Hello! I am writing a music bot (but it plays only rickroll) on JS, and i am stuck on getting the current voice channel of an user. This is my current call.

!message.author.client.voice.channel

If this condition is true, it will send me a message with these contents: Join a channel first!. But, what can you expect, it sends it without any care whether am i in a voice channel or not. m!play is the command.

Versions:

Node: v17.3.1
Discord.JS: 13.6.0 (as i found in package.json of node_modules/discord.js)
Discord directory (in node_modules): 0.8.2
Distube (package.json): 3.3.4

Message proof image Voice proof image

What to do?

Originally posted by @its-mrarsikk in https://github.com/discordjs/discord.js/discussions/7834

Syjalo commented 2 years ago

The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the Discord server instead of opening an issue – you will get redirected there anyway.