error fix in tiktokexception

pull/1480/head
electro199 3 years ago
parent 66202091eb
commit 5e79f33ed4

@ -147,7 +147,7 @@ class TikTok:
class TikTokTTSException(Exception): class TikTokTTSException(Exception):
def __init__(self, code: int, message: str): def __init__(self, code: int, message: str=""):
self._code = code self._code = code
self._message = message self._message = message
@ -162,6 +162,6 @@ class TikTokTTSException(Exception):
return f"Code: {self._code}, reason: the speaker doesn't exist, message: {self._message}" return f"Code: {self._code}, reason: the speaker doesn't exist, message: {self._message}"
if self._code == 5: if self._code == 5:
return f"You have to add session id in config to use titok TTS" return "You have to add session id in config to use titok TTS"
return f"Code: {self._message}, reason: unknown, message: {self._message}" return f"Code: {self._message}, reason: unknown, message: {self._message}"

Loading…
Cancel
Save