Current
Current

Reputation: 75

How would I make a bot self deafen itself?

I am currently trying to make the bot deafen itself as soon as it joins into a voice channel. I've tried

client.ws.voice.setSelfDeaf(true)

I've also been told to use

client.ws.send()

but I have no idea how to use it. Is there any way I could do it?

Upvotes: 3

Views: 6685

Answers (1)

Syntle
Syntle

Reputation: 5174

client.ws.voice and client.ws.send() are not a thing.

What you need to do is to use voice.setSelfDeaf(true) when the bot joins a voice channel.

voiceChannel.join()
  .then(connection => {
      connection.voice.setSelfDeaf(true);
  });

Upvotes: 4

Related Questions