diff --git a/bot.py b/bot.py index 2244215..9e85db8 100644 --- a/bot.py +++ b/bot.py @@ -134,15 +134,14 @@ class DiscordClient(commands.Bot): async def ValidateUuidOnRegister(self, uuid): async with aiohttp.ClientSession(cookies={"secretkey":self.secret_key}) as session: async with session.post(f"{self.backend_url}/api/discord/validate?uuid={uuid}", ssl=False) as response: - steamIdContainer = await response.json() - if steamIdContainer is None: - return None - else: + if response.status == 200: try: + steamIdContainer = await response.json() return steamIdContainer["steam64"] except: - print(steamIdContainer) return None + else: + raise Exception async def GetSteam64OfDiscord(self, user, no_cache = False): if user.id in self.discord2steam_cache and not no_cache: