Corrected error where .json() wasn't being awaited)
This commit is contained in:
parent
04e08ec177
commit
9fda303ab1
1 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ class Steam:
|
||||||
except ValueError:
|
except ValueError:
|
||||||
steam_id = await self.find_id(user)
|
steam_id = await self.find_id(user)
|
||||||
|
|
||||||
await self.bot.say("User given was: {}\nFound steam_id")
|
await self.bot.say("User given was: {}\nFound steam_id: {}".format(user, steam_id))
|
||||||
|
|
||||||
if steam_id is None:
|
if steam_id is None:
|
||||||
await self.bot.say("Sorry, couldn't find that Steam user!")
|
await self.bot.say("Sorry, couldn't find that Steam user!")
|
||||||
|
@ -59,7 +59,7 @@ class Steam:
|
||||||
|
|
||||||
url = "{}&appid=730&steamid={}".format(base_url, steam_id)
|
url = "{}&appid=730&steamid={}".format(base_url, steam_id)
|
||||||
async with self.session.get(url, headers=self.headers) as response:
|
async with self.session.get(url, headers=self.headers) as response:
|
||||||
data = response.json()
|
data = await response.json()
|
||||||
|
|
||||||
stuff_to_print = ['total_kills', 'total_deaths', 'total_wins', 'total_mvps']
|
stuff_to_print = ['total_kills', 'total_deaths', 'total_wins', 'total_mvps']
|
||||||
stats = "\n".join(
|
stats = "\n".join(
|
||||||
|
|
Loading…
Reference in a new issue