fix(aurora): don't try and use the attribute of a Member object when the object is a User object
This commit is contained in:
parent
5934506c8a
commit
d600a10729
2 changed files with 7 additions and 7 deletions
|
@ -46,7 +46,7 @@ class Aurora(commands.Cog):
|
|||
This cog stores all of its data in an SQLite database."""
|
||||
|
||||
__author__ = ["[cswimr](https://www.coastalcommits.com/cswimr)"]
|
||||
__version__ = "3.0.0-indev24"
|
||||
__version__ = "3.0.0-indev25"
|
||||
__git__ = "https://www.coastalcommits.com/cswimr/SeaCogs"
|
||||
__documentation__ = "https://seacogs.coastalcommits.com/aurora/"
|
||||
|
||||
|
|
|
@ -84,12 +84,6 @@ async def check_moddable(
|
|||
)
|
||||
return False
|
||||
|
||||
if target.guild_permissions.administrator:
|
||||
await ctx.send(
|
||||
content="You cannot moderate members with the Administrator permission!", ephemeral=True
|
||||
)
|
||||
return False
|
||||
|
||||
if isinstance(target, Member):
|
||||
if ctx.author.top_role <= target.top_role and await config.guild(ctx.guild).respect_hierarchy() is True:
|
||||
await ctx.send(
|
||||
|
@ -100,6 +94,12 @@ async def check_moddable(
|
|||
)
|
||||
return False
|
||||
|
||||
if target.guild_permissions.administrator:
|
||||
await ctx.send(
|
||||
content="You cannot moderate members with the Administrator permission!", ephemeral=True
|
||||
)
|
||||
return False
|
||||
|
||||
if (
|
||||
ctx.guild.get_member(ctx.bot.user.id).top_role
|
||||
<= target.top_role
|
||||
|
|
Loading…
Reference in a new issue