WIP: Moderation type registry #26
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue