1
0
Fork 0
mirror of synced 2024-05-19 12:02:29 +12:00

Moved title() to perform once, at the nd of the string setting up

This commit is contained in:
phxntxm 2016-07-13 23:34:17 -05:00
parent 5915c2cb11
commit 271ab1c716

View file

@ -59,13 +59,12 @@ class Overwatch:
except KeyError:
pass
fmt += "\nTime Played: {}\n".format(g_stats['time_played'])
fmt += "\n".join("{}: {}".format(i.title(), r) for i, r in data['hero_stats'].items())
#for i, r in data['hero_stats'].items():
#fmt += "\n{}: {}".format(i.replace("_", " ").title(), r)
fmt += "\n".join("{}: {}".format(i, r) for i, r in data['hero_stats'].items())
if hero == "":
await self.bot.say("Overwatch stats for {}: ```py\n{}```".format(user.name, fmt))
else:
await self.bot.say("Overwatch stats for {} using the hero {}: ```py\n{}``` ".format(user.name, hero, fmt.replace("_"," ")))
await self.bot.say("Overwatch stats for {} using the hero {}: ```py\n{}``` "
.format(user.name, hero, fmt.title().replace("_", " ")))
@ow.command(pass_context=True, name="add")
async def add(self, ctx, bt: str):