aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2022-12-08 19:16:14 +0000
committerGravatar GitHub <[email protected]>2022-12-08 19:16:14 +0000
commitdce8be1b3213f891b986be6ae6a2b2735d1fda30 (patch)
treee8edafdd2cd16b503a0b69d714d2ec4aaa28c392
parentMerge pull request #2356 from python-discord/fix-help-channel-open-with-no-co... (diff)
parentMerge branch 'main' into maybe-fix-help-stats-bug (diff)
Merge pull request #2351 from python-discord/maybe-fix-help-stats-bug
Don't count bot messages as an answer in a thread
-rw-r--r--bot/exts/help_channels/_caches.py2
-rw-r--r--bot/exts/help_channels/_cog.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/bot/exts/help_channels/_caches.py b/bot/exts/help_channels/_caches.py
index 5d98f99d3..3369fc0a6 100644
--- a/bot/exts/help_channels/_caches.py
+++ b/bot/exts/help_channels/_caches.py
@@ -9,6 +9,6 @@ help_dm = RedisCache(namespace="HelpChannels.help_dm")
# RedisCache[discord.TextChannel.id, str[set[discord.User.id]]]
session_participants = RedisCache(namespace="HelpChannels.session_participants")
-# Stores posts that have had a non-claimant reply.
+# Stores posts that have had a non-claimant, non-bot, reply.
# Currently only used to determine whether the post was answered or not when collecting stats.
posts_with_non_claimant_messages = RedisCache(namespace="HelpChannels.posts_with_non_claimant_messages")
diff --git a/bot/exts/help_channels/_cog.py b/bot/exts/help_channels/_cog.py
index 31f30b7aa..bc6bd0303 100644
--- a/bot/exts/help_channels/_cog.py
+++ b/bot/exts/help_channels/_cog.py
@@ -179,5 +179,5 @@ class HelpForum(commands.Cog):
await _message.notify_session_participants(message)
- if message.author.id != message.channel.owner_id:
+ if not message.author.bot and message.author.id != message.channel.owner_id:
await _caches.posts_with_non_claimant_messages.set(message.channel.id, "sentinel")