Adapters in ClientVoiceManager usage. #7843
-
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: 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 What to do? Originally posted by @its-mrarsikk in https://github.com/discordjs/discord.js/discussions/7834 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
This comment has been hidden.
This comment has been hidden.
-
What you're probably looking for is |
Beta Was this translation helpful? Give feedback.
message.author.client
is a reference to your Client object. What you're accessing is your bots voice state, not theirs.What you're probably looking for is
message.member.voice