Archived
Fix crash when discord oauth2 answer is invalid
This commit is contained in:
@@ -22,7 +22,8 @@ def discord_process_code(code: str) -> dict | None:
|
||||
if "error" in json_data:
|
||||
print(json_data)
|
||||
return None
|
||||
|
||||
if (not "token_type" in json_data) or (not "access_token" in json_data):
|
||||
return None
|
||||
token_type = json_data["token_type"]
|
||||
access_token = json_data["access_token"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user