Corrected error where .text() wasn't being awaited)
This commit is contained in:
parent
9fda5f3bad
commit
04e08ec177
|
@ -20,7 +20,7 @@ class Steam:
|
|||
# Get the profile link based on the user provided, and request the xml data for it
|
||||
url = 'http://steamcommunity.com/id/{}/?xml=1'.format(user)
|
||||
async with self.session.get(url, headers=self.headers) as response:
|
||||
data = response.text()
|
||||
data = await response.text()
|
||||
# Remove the xml version content, it breaks etree.fromstring
|
||||
data = re.sub('<\?xml.*\?>', '', data)
|
||||
tree = etree.fromstring(data)
|
||||
|
@ -51,6 +51,8 @@ class Steam:
|
|||
except ValueError:
|
||||
steam_id = await self.find_id(user)
|
||||
|
||||
await self.bot.say("User given was: {}\nFound steam_id")
|
||||
|
||||
if steam_id is None:
|
||||
await self.bot.say("Sorry, couldn't find that Steam user!")
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue