Cleaned up first setup of csgo stats
This commit is contained in:
parent
9fda303ab1
commit
938337688b
1 changed files with 1 additions and 3 deletions
|
@ -51,8 +51,6 @@ 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: {}".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!")
|
||||||
return
|
return
|
||||||
|
@ -64,7 +62,7 @@ class Steam:
|
||||||
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(
|
||||||
"{}: {}".format(d['name'], d['value']) for d in data['playerstats']['stats'] if d['name'] in stuff_to_print)
|
"{}: {}".format(d['name'], d['value']) for d in data['playerstats']['stats'] if d['name'] in stuff_to_print)
|
||||||
await self.bot.say("CS:GO Stats for user {}: \n```\n{}```".format(user, stats))
|
await self.bot.say("CS:GO Stats for user {}: \n```\n{}```".format(user, stats.title().replace("_", " ")))
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
|
|
Loading…
Reference in a new issue