From 797c4bf8b55a269a9abd82b1153d0829b8e2ebc2 Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Thu, 14 Jul 2016 13:23:11 -0500 Subject: [PATCH] Added a couple more stats to show for overwatch --- cogs/core.py | 7 ++----- cogs/overwatch.py | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/cogs/core.py b/cogs/core.py index f7c577a..9487a98 100644 --- a/cogs/core.py +++ b/cogs/core.py @@ -110,11 +110,8 @@ class Core: if num > 100: await self.bot.say("What die has more than 100 sides? Please, calm down") return - #valueStr = str(random.randint(1, num)) + valueStr = ", ".join("{}".format(random.randint(1, num)) for i in range(0, int(dice))) - #for i in range(1, int(dice)): - #value = random.randint(1, num) - #valueStr += ", {}".format(value) if int(dice) == 1: fmt = '{0.message.author.name} has rolled a {2} sided die and got the number {3}!' @@ -151,7 +148,7 @@ class Core: cursor.execute('select * from tags where server_id=%s and tag=%s', (ctx.message.server.id, tag)) response = cursor.fetchone() if response is not None: - await self.bot.say('That tag already exists! Please remove it and re-add it!') + await self.bot.say('That tag already exists! Please remove it and re-add it if you want to change it') config.closeConnection() return sql = 'insert into tags (server_id, tag, result) values (%s, %s, %s)' diff --git a/cogs/overwatch.py b/cogs/overwatch.py index 09d04c2..f118626 100644 --- a/cogs/overwatch.py +++ b/cogs/overwatch.py @@ -8,7 +8,8 @@ import urllib.error import json base_url = "https://owapi.net/api/v2/u/" -check_g_stats = ["eliminations","deaths",'kpd','wins','losses','time_played'] +check_g_stats = ["eliminations","deaths",'kpd','wins','losses','time_played', + 'cards','damage_done','healing_done','multikills'] check_o_stats = ['wins','losses'] class Overwatch: