#How can I turn off the microphone on the bot itself?

62 messages · Page 1 of 1 (latest)

late merlin
#

I can selfmute the bot with the joinVoiceChannel feature, but I couldn't find its external cast. Can anyone help?

small kiteBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

summer valve
#

Pass selfMute: true option

late merlin
#

now i'm using this

#

but how can i turn it on and off with the help of a command

#

@summer valve do you have any knowledge

warm lagoon
#

create slash commands for mute and unmute via the SlashCommandBuilder

late merlin
#

how can i do this as command

warm lagoon
late merlin
#

I mean how can I use selfmute outside of joinVoiceChannel

warm lagoon
#

why do want that as a command? cant you just server mute the bot?

late merlin
#

so

selfMute: false

warm lagoon
#

so you want the bot to selfMute whenever someone plays a sound? did I get that right?

late merlin
#

yeah

warm lagoon
#

I don't get why you would want to do that but I guess you would have to get the ID of every command which allows the bot to play something when he is in a channel.. yk?

late merlin
warm lagoon
late merlin
warm lagoon
late merlin
#

What does that have to do with what I said?

#

I'm just asking how can I selfmute

warm lagoon
#

on how to get the id of the command for the bot to selfMute or not?

late merlin
#

this is my voice connect event

#

I want the bot to mute when the voice update is done, that's all

#

selfMute: false

#

I'm going to write now

#

but I don't know how to selfMute false

warm lagoon
#

me neither, I don't get what you want

late merlin
warm lagoon
#

set it to false

late merlin
warm lagoon
#

client.on("*", async (oldState, newState) => { set.newState.selfMute: false; });

#

or something like that

late merlin
#

I am trying

warm lagoon
#

then idk sry

late merlin
#

np

drowsy pecanBOT
#

Documentation suggestion for @late merlin:
method VoiceState#setMute()
Mutes/unmutes the member of this voice state.

late merlin
#

@summer valve Doesn't that just tell us whether it's true or false?

elfin rivet
#

No, it literally sets it. That’s why it‘s called setMute and is a function

late merlin
#

Isn't that supposed to happen?

#

but it didn't work

elfin rivet
#

That will mute every person that ever joins/leaves/mutes/unmutes/deafens/undeafens in any VoiceChannel your bot can see and manage… I doubt that‘s what you intend it to do. Don‘t do it in voiceStateUpdate event…

#

Also check you actually have GuildVoiceStates intent

late merlin
#

these are my codes

elfin rivet
#

<Guild>.members.me.voice.setMute(false) or true if you want to mute it

late merlin
#

I want it to turn on the mute when there is an update in the audio

elfin rivet
#

Then you need to listen to the VoiceReceiver‘s SpeakingMap‘s event and mute there

elfin rivet