0
votes

So, the Discord bot that I'm making is sort of a server manager kind of thing and I'm making a channel lock command which basically makes it so people can't send messages in the channel.

How would I make it so that when someone types the command it turns the 'Send Messages' permission FALSE?

Any help is appreciated! Thanks.

1

1 Answers

0
votes
const Channel = client.channels.cache.get("ChannelID");
if (!Channel) return console.log("Invalid channel ID.");
Channel.updateOverwrite(message.guild.roles.everyone, {SEND_MESSAGES: false});