#trying to add to bot a command that will server mute all users in a voice channel

6 messages · Page 1 of 1 (latest)

subtle isle
#

So the code below is the code i am using, the bot starts fine with no errors but when i try to evoke it, it does not work

#

ok so i changed it up

#

but i get this error now

#

Caught exception: TypeError: members.foreach is not a function

#

case 'vcmuteall':
if (!message.member.permissions.has('MANAGE_MESSAGES')) return;
const members = message.member.voice.channel.members;
members.foreach(member => {
member.voice.setmute(true);
})

vagrant garnet
#

you want to call forEach, the capitalization matters