def __init__(self, raw_status, data=None): self.checkStatus(raw_status) if data != None: self.data = ts3utils.parseData(data) self.data_e = True else: self.data_e = False
def checkStatus(self, raw_status): status = raw_status.replace('error ', '') parsed = ts3utils.parseData(status)[0] if parsed['id'] != 0: print(TS3Error(parsed['msg'], parsed['id']))