aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Xithrius <[email protected]>2021-11-17 22:10:08 +0000
committerGravatar GitHub <[email protected]>2021-11-17 22:10:08 +0000
commit5b5e0b8949f92de81fb997c84f035d6383f10f58 (patch)
treebbf37cd66ce6cfe7e5c1f67b48a0c13bc4d0548d
parentAdd #bot-commands to guild features in !server (diff)
parentDon't log threads in admin channels (#1954) (diff)
Merge branch 'main' into jb3/guild-features-channels
-rw-r--r--bot/exts/moderation/modlog.py12
-rw-r--r--bot/resources/tags/off-topic.md4
2 files changed, 14 insertions, 2 deletions
diff --git a/bot/exts/moderation/modlog.py b/bot/exts/moderation/modlog.py
index 6416bc3c7..91709e5e5 100644
--- a/bot/exts/moderation/modlog.py
+++ b/bot/exts/moderation/modlog.py
@@ -775,6 +775,10 @@ class ModLog(Cog, name="ModLog"):
@Cog.listener()
async def on_thread_update(self, before: Thread, after: Thread) -> None:
"""Log thread archiving, un-archiving and name edits."""
+ if self.is_channel_ignored(after.id):
+ log.trace("Ignoring update of thread %s (%d)", after.mention, after.id)
+ return
+
if before.name != after.name:
await self.send_log_message(
Icons.hash_blurple,
@@ -811,6 +815,10 @@ class ModLog(Cog, name="ModLog"):
@Cog.listener()
async def on_thread_delete(self, thread: Thread) -> None:
"""Log thread deletion."""
+ if self.is_channel_ignored(thread.id):
+ log.trace("Ignoring deletion of thread %s (%d)", thread.mention, thread.id)
+ return
+
await self.send_log_message(
Icons.hash_red,
Colours.soft_red,
@@ -829,6 +837,10 @@ class ModLog(Cog, name="ModLog"):
if thread.me:
return
+ if self.is_channel_ignored(thread.id):
+ log.trace("Ignoring creation of thread %s (%d)", thread.mention, thread.id)
+ return
+
await self.send_log_message(
Icons.hash_green,
Colours.soft_green,
diff --git a/bot/resources/tags/off-topic.md b/bot/resources/tags/off-topic.md
index 6a864a1d5..287224d7f 100644
--- a/bot/resources/tags/off-topic.md
+++ b/bot/resources/tags/off-topic.md
@@ -1,9 +1,9 @@
**Off-topic channels**
There are three off-topic channels:
-• <#291284109232308226>
-• <#463035241142026251>
• <#463035268514185226>
+• <#463035241142026251>
+• <#291284109232308226>
Their names change randomly every 24 hours, but you can always find them under the `OFF-TOPIC/GENERAL` category in the channel list.