From 6005bb3eee6d4bdd19d0e895b8284f4640510f66 Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Sat, 27 Oct 2018 12:33:10 -0700 Subject: [PATCH] Chatchart changes were handled in #27 --- chatchart/chatchart.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/chatchart/chatchart.py b/chatchart/chatchart.py index 01f0392..d22a617 100644 --- a/chatchart/chatchart.py +++ b/chatchart/chatchart.py @@ -103,7 +103,6 @@ class Chatchart(BaseCog): return await ctx.send("No permissions to read that channel.") msg_data = {"total count": 0, "users": {}} - for msg in history: if len(msg.author.name) >= 20: short_name = "{}...".format(msg.author.name[:20]) @@ -120,10 +119,6 @@ class Chatchart(BaseCog): msg_data["users"][whole_name]["msgcount"] = 1 msg_data["total count"] += 1 - if msg_data['users'] == {}: - await em.delete() - return await ctx.message.channel.send(f'Only bots have sent messages in {channel.mention}') - for usr in msg_data["users"]: pd = float(msg_data["users"][usr]["msgcount"]) / float(msg_data["total count"]) msg_data["users"][usr]["percent"] = round(pd * 100, 1)