From 23eba46948b1ee96f6dc0768c4af38e7991a9b84 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 4 May 2024 21:02:18 -0400 Subject: [PATCH] fix(aurora): fix a few classmethods returning None instead of their constructed classes --- aurora/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aurora/models.py b/aurora/models.py index be0c0e2..b336d3a 100644 --- a/aurora/models.py +++ b/aurora/models.py @@ -133,6 +133,7 @@ class PartialUser(AuroraBaseModel): return cls(bot=bot, id=user.id, username=user.name, discriminator=user.discriminator) except NotFound: 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): @@ -159,6 +160,7 @@ class PartialChannel(AuroraGuildModel): 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="Deleted Channel") + return cls(bot=bot, guild_id=channel.guild.id, id=channel.id, username=channel.name) class PartialRole(AuroraGuildModel): id: int