fix(aurora): fixed the Moderation.get_target method trying to get a channel object from a user id
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Failing after 28s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 42s

This commit is contained in:
Seaswimmer 2024-07-06 11:58:46 -04:00
parent 127dd564f5
commit 134e787c42
Signed by: cswimr
GPG key ID: 3813315477F26F82

View file

@ -52,7 +52,7 @@ class Moderation(AuroraGuildModel):
return await PartialUser.from_id(self.bot, self.moderator_id)
async def get_target(self) -> Union["PartialUser", "PartialChannel"]:
if self.target_type == "USER":
if str.lower(self.target_type) == "user":
return await PartialUser.from_id(self.bot, self.target_id)
return await PartialChannel.from_id(self.bot, self.target_id, self.guild)