code: def cmd_part(self, connection, sender, target, payload):
          
          if payload:
              connection.part(payload)
          else:
              raise ValueError("No channel given")
docs: Asks the bot to leave a channel