From a675792fdf43d2232685c1473b8d64bd49cb8745 Mon Sep 17 00:00:00 2001 From: Flame442 <34169552+Flame442@users.noreply.github.com> Date: Fri, 5 Apr 2019 09:38:10 -0400 Subject: [PATCH] Fix empty embed field when a role has all or no permissions --- tools/tools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/tools.py b/tools/tools.py index 580673c..2ec5db6 100644 --- a/tools/tools.py +++ b/tools/tools.py @@ -516,6 +516,10 @@ class Tools(BaseCog): perms_we_have += "{0}\n".format(str(x).split("'")[1]) else: perms_we_dont += "{0}\n".format(str(x).split("'")[1]) + if perms_we_have == "": + perms_we_have = "None" + if perms_we_dont == "": + perms_we_dont = "None" msg = discord.Embed(description="Gathering role stats...", colour=role.color) if role.color is None: role.color = discord.Colour(value=0x000000)