fix(aurora): fix a few classmethods returning None instead of their constructed classes
This commit is contained in:
parent
0b31e70089
commit
23eba46948
1 changed files with 2 additions and 0 deletions
|
@ -133,6 +133,7 @@ class PartialUser(AuroraBaseModel):
|
||||||
return cls(bot=bot, id=user.id, username=user.name, discriminator=user.discriminator)
|
return cls(bot=bot, id=user.id, username=user.name, discriminator=user.discriminator)
|
||||||
except NotFound:
|
except NotFound:
|
||||||
return cls(bot=bot, id=user_id, username="Deleted User", discriminator=0)
|
return cls(bot=bot, id=user_id, username="Deleted User", discriminator=0)
|
||||||
|
return cls(bot=bot, id=user.id, username=user.name, discriminator=user.discriminator)
|
||||||
|
|
||||||
|
|
||||||
class PartialChannel(AuroraGuildModel):
|
class PartialChannel(AuroraGuildModel):
|
||||||
|
@ -159,6 +160,7 @@ class PartialChannel(AuroraGuildModel):
|
||||||
if e == Forbidden:
|
if e == Forbidden:
|
||||||
return cls(bot=bot, guild_id=0, id=channel_id, name="Forbidden Channel")
|
return cls(bot=bot, guild_id=0, id=channel_id, name="Forbidden Channel")
|
||||||
return cls(bot=bot, guild_id=0, id=channel_id, name="Deleted Channel")
|
return cls(bot=bot, guild_id=0, id=channel_id, name="Deleted Channel")
|
||||||
|
return cls(bot=bot, guild_id=channel.guild.id, id=channel.id, username=channel.name)
|
||||||
|
|
||||||
class PartialRole(AuroraGuildModel):
|
class PartialRole(AuroraGuildModel):
|
||||||
id: int
|
id: int
|
||||||
|
|
Loading…
Reference in a new issue