1
0
Fork 0
mirror of synced 2024-06-28 19:20:34 +12:00

Corrected error where only the author was searched instead of the user

This commit is contained in:
Phxntxm 2016-08-05 10:23:59 -05:00
parent d137884b5b
commit a85082a876

View file

@ -33,7 +33,7 @@ class Overwatch:
Provide a hero after the member to get stats for that specific hero"""
if user is None:
user = ctx.message.author
bt = config.getContent('overwatch').get(ctx.message.author.id)
bt = config.getContent('overwatch').get(user.id)
if bt is None:
await self.bot.say("I do not have this user's battletag saved!")
@ -56,7 +56,7 @@ class Overwatch:
with aiohttp.ClientSession(headers={"User-Agent": "Bonfire/1.0.0"}) as s:
async with s.get(url) as r:
result = await r.text()
msg = json.loads(result)['msg']
msg = json.loads(result).get('msg')
if msg == 'hero data not found':
fmt = "{} has not used the hero {} before!".format(user.name, hero.title())
await self.bot.say(fmt)