From c9a6c0ffcc9df75f00ca421c176e8b8799505708 Mon Sep 17 00:00:00 2001 From: Will Date: Thu, 22 Feb 2018 20:21:39 -0500 Subject: [PATCH] Converters don't work the way I think they do (#1336) (No they don't Will -- Kowlin) --- redbot/cogs/admin/admin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/redbot/cogs/admin/admin.py b/redbot/cogs/admin/admin.py index 424162151..3be869424 100644 --- a/redbot/cogs/admin/admin.py +++ b/redbot/cogs/admin/admin.py @@ -140,11 +140,13 @@ class Admin: Adds a role to a user. If user is left blank it defaults to the author of the command. """ + if user is None: + user = ctx.author if self.pass_user_heirarchy_check(ctx, rolename): # noinspection PyTypeChecker await self._addrole(ctx, user, rolename) else: - await self.complain(ctx, USER_HIERARCHY_ISSUE) + await self.complain(ctx, USER_HIERARCHY_ISSUE, member=ctx.author) @commands.command() @commands.guild_only() @@ -155,6 +157,8 @@ class Admin: Removes a role from a user. If user is left blank it defaults to the author of the command. """ + if user is None: + user = ctx.author if self.pass_user_heirarchy_check(ctx, rolename): # noinspection PyTypeChecker await self._removerole(ctx, user, rolename)