fix(aurora): fixed a broken from_id method

This commit is contained in:
Seaswimmer 2024-05-24 04:09:27 -04:00
parent 0cc7d6079d
commit 7a9c9846de
Signed by untrusted user: cswimr
GPG key ID: 5D671B5D03D65A7F

View file

@ -47,12 +47,12 @@ class PartialChannel(AuroraGuildModel):
if not channel:
try:
channel = await bot.fetch_channel(channel_id)
return cls(bot=bot, guild_id=channel.guild.id, id=channel.id, username=channel.name)
return cls(bot=bot, guild_id=channel.guild.id, id=channel.id, name=channel.name)
except (NotFound, InvalidData, HTTPException, Forbidden) as e:
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)
return cls(bot=bot, guild_id=channel.guild.id, id=channel.id, name=channel.name)
class PartialRole(AuroraGuildModel):
id: int