How do you do it by hand?
Channel settings β Permissions β @everyone β turn off Send Messages. Do the reverse to open it. If the channel has several role permissions, you have to check each one; that's exactly why doing it with a command is safer.