WIP: Refactor Aurora (3.0.0) #29

Draft
cswimr wants to merge 347 commits from aurora-pydantic into main
Showing only changes of commit 7a9c9846de - Show all commits

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