Closed Tomato6966 closed 3 years ago
You can do it with <Queue>.connection
and playSong
, playList
event.
if I do:
distube.on("playSong", async (message, queue, song) => {
queue.connection.setDeaf(true);
functions.playsongyes(client, message, queue, song);
})
I get: queue.connection.setDeaf is not a function
Because it is VoiceConnection
https://discord.js.org/#/docs/main/stable/class/VoiceConnection
doesnt work neither -_-
nvm i will do before distube starts
const connection = await voiceChannel.join();
connection.voice.setDeaf(true);
connection.voice.setSelfDeaf(true)
It's queue.connection.voice.setSelfDeaf(true)
in playSong
event 😕
oh connection is a connection parameter oh then ok
I see, your issue should be <VoiceState>.setSelfDeaf()
, not <VoiceConnection>
You should read the docs carefully, It has type expressions. Or use TypeScript.
i dont read docs 💯
Add option for :
<voiceState>.setDeaf(<true/false>)
as well as for :
<voiceState>.setSelfDeaf(<true/false>)
Thanks ;)