fix(aurora): fixed the Moderation.get_target
method trying to get a channel object from a user id
This commit is contained in:
parent
127dd564f5
commit
134e787c42
1 changed files with 1 additions and 1 deletions
|
@ -52,7 +52,7 @@ class Moderation(AuroraGuildModel):
|
||||||
return await PartialUser.from_id(self.bot, self.moderator_id)
|
return await PartialUser.from_id(self.bot, self.moderator_id)
|
||||||
|
|
||||||
async def get_target(self) -> Union["PartialUser", "PartialChannel"]:
|
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 PartialUser.from_id(self.bot, self.target_id)
|
||||||
return await PartialChannel.from_id(self.bot, self.target_id, self.guild)
|
return await PartialChannel.from_id(self.bot, self.target_id, self.guild)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue