gsd 1 month ago
parent
commit
85289a63e4
  1. 9
      bot.py

9
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:

Loading…
Cancel
Save