fix(aurora): fixed retrieving a User object instead of a Member object
All checks were successful
Actions / Build Documentation (MkDocs) (pull_request) Successful in 30s
Actions / Lint Code (Ruff & Pylint) (pull_request) Successful in 49s

This commit is contained in:
Seaswimmer 2024-09-08 12:33:16 -04:00
parent 9e21879a49
commit d4fe97f247
Signed by: cswimr
GPG key ID: 456E21B886A39061

View file

@ -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)