def execute(self):
        if not self.args:
            chnls = 'Channels:'
            for key, value in self.pc.channels.items():
                if value:
                    chnls += '\n  ' + key + ': ' + 'on'
                else:
                    chnls += '\n  ' + key + ': ' + 'off'
            self.pc.update_output(chnls)
            return
        toggle = {'on': True, 'off': False}
        args = self.args.split()
        channel = args[0].lower()
        choice = args[1].lower()
        if channel in self.pc.channels.keys():
            if choice in toggle.keys():
                self.pc.channels[channel] = toggle[choice]
                self.pc.update_output('The %s channel has been turned %s.\n' % (channel, choice))
            else:
                self.pc.update_output('You can only turn the %s channel on or off.\n' % channel)
        else:
            self.pc.update_output('Which channel do you want to change?\n')
dataset/ETHPy150Open shinymud/ShinyMUD/src/shinymud/commands/commands.py/Channel.execute/original