mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 19:28:54 -05:00
Converters don't work the way I think they do (#1336)
(No they don't Will -- Kowlin)
This commit is contained in:
parent
d414806fa2
commit
c9a6c0ffcc
@ -140,11 +140,13 @@ class Admin:
|
|||||||
Adds a role to a user. If user is left blank it defaults to the
|
Adds a role to a user. If user is left blank it defaults to the
|
||||||
author of the command.
|
author of the command.
|
||||||
"""
|
"""
|
||||||
|
if user is None:
|
||||||
|
user = ctx.author
|
||||||
if self.pass_user_heirarchy_check(ctx, rolename):
|
if self.pass_user_heirarchy_check(ctx, rolename):
|
||||||
# noinspection PyTypeChecker
|
# noinspection PyTypeChecker
|
||||||
await self._addrole(ctx, user, rolename)
|
await self._addrole(ctx, user, rolename)
|
||||||
else:
|
else:
|
||||||
await self.complain(ctx, USER_HIERARCHY_ISSUE)
|
await self.complain(ctx, USER_HIERARCHY_ISSUE, member=ctx.author)
|
||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
@ -155,6 +157,8 @@ class Admin:
|
|||||||
Removes a role from a user. If user is left blank it defaults to the
|
Removes a role from a user. If user is left blank it defaults to the
|
||||||
author of the command.
|
author of the command.
|
||||||
"""
|
"""
|
||||||
|
if user is None:
|
||||||
|
user = ctx.author
|
||||||
if self.pass_user_heirarchy_check(ctx, rolename):
|
if self.pass_user_heirarchy_check(ctx, rolename):
|
||||||
# noinspection PyTypeChecker
|
# noinspection PyTypeChecker
|
||||||
await self._removerole(ctx, user, rolename)
|
await self._removerole(ctx, user, rolename)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user