From c26433a5767038e7940df3983bca7a2a2ee812e4 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Sat, 4 Jul 2020 04:22:21 +0100 Subject: [PATCH] Adding more commentary --- cogs/help/info.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cogs/help/info.py b/cogs/help/info.py index 1a01c11b..f94350a9 100644 --- a/cogs/help/info.py +++ b/cogs/help/info.py @@ -28,15 +28,21 @@ Perms = {"create instant invite": "", "change nickname": ""} +# Method to detect which permissions to filter out def DetectPermissions(message, dct): + # Split the message individual permissions message = message.split(",") new_msg = "" + + # For every permission for word in message: + # Add the permission in the new string if the permission is not in the dictionary if word not in dct: - print(word) new_msg += word + ", " + # Do nothing if the permission is in the dictionary else: pass + return new_msg