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,7 +434,10 @@ class Case:
|
|||||||
if until and duration:
|
if until and duration:
|
||||||
case_text += _("**Until:** {}\n**Duration:** {}\n").format(until, duration)
|
case_text += _("**Until:** {}\n**Duration:** {}\n").format(until, duration)
|
||||||
if self.channel:
|
if self.channel:
|
||||||
case_text += _("**Channel**: {}\n").format(self.channel.name)
|
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:
|
if amended_by:
|
||||||
case_text += _("**Amended by:** {}\n").format(amended_by)
|
case_text += _("**Amended by:** {}\n").format(amended_by)
|
||||||
if last_modified:
|
if last_modified:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user