M
M
MrAfitol2021-06-02 00:07:04
Node.js
MrAfitol, 2021-06-02 00:07:04

What should I do if I'm in a voice channel but the bot says I'm not in it?

Here is the code, everything seems to be correct:

const voiceChannel = message.member.voiceChannel;
  if (!voiceChannel) return message.channel.send('You need to be in a voice channel to play music!');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-06-02
@MrAfitol

if you are using 12+ version of discord.js you should usemessage.member.voice.channel

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question