From 76112ddf3b12af0fb3e70120e6878157deaaef4c Mon Sep 17 00:00:00 2001 From: sgoudham Date: Sat, 25 Jul 2020 08:23:35 +0100 Subject: [PATCH] Making string of missing permissions and displaying them to the user --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 64dd6118..8b5c3c2e 100644 --- a/main.py +++ b/main.py @@ -398,8 +398,8 @@ async def on_command_error(ctx, args2): # Async def for handling command bad argument error async def on_bot_forbidden(ctx, args2): - for perm in args2.missing_perms: - missing_perms = "".join(string.capwords(perm.replace("_", " "))) + # Convert list into string of the missing permissions + missing_perms = string.capwords(", ".join(args2.missing_perms).replace("_", " ")) # Send an error message to the user telling them that the member specified could not be found message = await ctx.send(f"I need **{missing_perms}** permission(s) to execute this command!")