aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-10-22 13:08:13 +0000
committerGravatar GitHub <[email protected]>2021-10-22 13:08:13 +0000
commitb912cc7c7e3c52e502ec7c558975dcf558a1b418 (patch)
tree8a0a6b581ded2e845051a51d2fbb8be3e2a7d908
parentMerge pull request #1902 from python-discord/bump-licenses (diff)
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.
-rw-r--r--bot/exts/moderation/modlog.py15
1 files 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()