fix(aurora): fixed retrieving a User object instead of a Member object
This commit is contained in:
parent
9e21879a49
commit
d4fe97f247
1 changed files with 2 additions and 2 deletions
|
@ -243,7 +243,7 @@ class AddRole(Type):
|
|||
@classmethod
|
||||
async def expiry_handler(cls, moderation: Moderation) -> int:
|
||||
try:
|
||||
target = moderation.bot.get_user(moderation.target_id)
|
||||
target = moderation.guild.get_member(moderation.target_id)
|
||||
if not target:
|
||||
try:
|
||||
target = await moderation.guild.fetch_member(moderation.target_id)
|
||||
|
@ -418,7 +418,7 @@ class RemoveRole(Type):
|
|||
@classmethod
|
||||
async def expiry_handler(cls, moderation: Moderation) -> int:
|
||||
try:
|
||||
target = moderation.bot.get_user(moderation.target_id)
|
||||
target = moderation.guild.get_member(moderation.target_id)
|
||||
if not target:
|
||||
try:
|
||||
target = await moderation.guild.fetch_member(moderation.target_id)
|
||||
|
|
Loading…
Reference in a new issue