From 36ee87200f837e2bec038f274ac3ccc39d7e45d5 Mon Sep 17 00:00:00 2001 From: wookie184 Date: Wed, 30 Nov 2022 19:11:49 +0000 Subject: Don't count bot messages as an answer in a thread --- bot/exts/help_channels/_caches.py | 2 +- bot/exts/help_channels/_cog.py | 2 +- 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") -- cgit v1.2.3