From b912cc7c7e3c52e502ec7c558975dcf558a1b418 Mon Sep 17 00:00:00 2001 From: Matteo Bertucci Date: Fri, 22 Oct 2021 13:08:13 +0000 Subject: Modlog: explicitly write thread names It seems like there could be some caching issue with threads causing to appear as deleted channels. Beside, we also want to keep the name of deleted threads around. --- bot/exts/moderation/modlog.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/bot/exts/moderation/modlog.py b/bot/exts/moderation/modlog.py index 9d1ae6853..c6752d0f9 100644 --- a/bot/exts/moderation/modlog.py +++ b/bot/exts/moderation/modlog.py @@ -800,7 +800,10 @@ class ModLog(Cog, name="ModLog"): icon, colour, f"Thread {action}", - f"Thread {after.mention} (`{after.id}`) from {after.parent.mention} (`{after.parent.id}`) was {action}" + ( + f"Thread {after.mention} ({after.name}, `{after.id}`) from {after.parent.mention} " + f"(`{after.parent.id}`) was {action}" + ) ) @Cog.listener() @@ -810,7 +813,10 @@ class ModLog(Cog, name="ModLog"): Icons.hash_red, Colours.soft_red, "Thread deleted", - f"Thread {thread.mention} (`{thread.id}`) from {thread.parent.mention} (`{thread.parent.id}`) deleted" + ( + f"Thread {thread.mention} ({thread.name}, `{thread.id}`) from {thread.parent.mention} " + f"(`{thread.parent.id}`) deleted" + ) ) @Cog.listener() @@ -825,7 +831,10 @@ class ModLog(Cog, name="ModLog"): Icons.hash_green, Colours.soft_green, "Thread created", - f"Thread {thread.mention} (`{thread.id}`) from {thread.parent.mention} (`{thread.parent.id}`) created" + ( + f"Thread {thread.mention} ({thread.name}, `{thread.id}`) from {thread.parent.mention} " + f"(`{thread.parent.id}`) created" + ) ) @Cog.listener() -- cgit v1.2.3