aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-04-19 17:14:40 +0100
committerGravatar Chris Lovering <[email protected]>2022-04-19 17:14:53 +0100
commita90c8449a54d831662e43935d8c58167c20c84e9 (patch)
treee9e6b6f5eebbc19aa96fdf84eb25571e7809816a
parentBump bot-core for new discord.py version (diff)
Utilise new on_thread_create event for modlog
-rw-r--r--bot/exts/moderation/modlog.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/bot/exts/moderation/modlog.py b/bot/exts/moderation/modlog.py
index 843d56b57..80f68e442 100644
--- a/bot/exts/moderation/modlog.py
+++ b/bot/exts/moderation/modlog.py
@@ -840,13 +840,8 @@ class ModLog(Cog, name="ModLog"):
)
@Cog.listener()
- async def on_thread_join(self, thread: Thread) -> None:
+ async def on_thread_create(self, thread: Thread) -> None:
"""Log thread creation."""
- # If we are in the thread already we can most probably assume we already logged it?
- # We don't really have a better way of doing this since the API doesn't make any difference between the two
- if thread.me:
- return
-
if self.is_channel_ignored(thread.id):
log.trace("Ignoring creation of thread %s (%d)", thread.mention, thread.id)
return