1
0
Fork 0
mirror of synced 2024-06-02 18:54:33 +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: except KeyError:
pass pass
fmt += "\nTime Played: {}\n".format(g_stats['time_played']) fmt += "\nTime Played: {}\n".format(g_stats['time_played'])
fmt += "\n".join("{}: {}".format(i.title(), r) for i, r in data['hero_stats'].items()) fmt += "\n".join("{}: {}".format(i, r) for i, r in data['hero_stats'].items())
#for i, r in data['hero_stats'].items():
#fmt += "\n{}: {}".format(i.replace("_", " ").title(), r)
if hero == "": if hero == "":
await self.bot.say("Overwatch stats for {}: ```py\n{}```".format(user.name, fmt)) await self.bot.say("Overwatch stats for {}: ```py\n{}```".format(user.name, fmt))
else: 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") @ow.command(pass_context=True, name="add")
async def add(self, ctx, bt: str): async def add(self, ctx, bt: str):