mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Modlog API] Handle deleted channels in Case.message_content() (#4415)
* Handle deleted channels in case.message_content() * remove avatar_url + black
This commit is contained in:
parent
fec25fcaba
commit
4e1ce7524b
@ -434,6 +434,9 @@ class Case:
|
||||
if until and duration:
|
||||
case_text += _("**Until:** {}\n**Duration:** {}\n").format(until, duration)
|
||||
if self.channel:
|
||||
if isinstance(self.channel, int):
|
||||
case_text += _("**Channel**: {} (Deleted)\n").format(self.channel)
|
||||
else:
|
||||
case_text += _("**Channel**: {}\n").format(self.channel.name)
|
||||
if amended_by:
|
||||
case_text += _("**Amended by:** {}\n").format(amended_by)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user