From 4a623554eb32760c6c36ccaa1d7f7023fd74e09a Mon Sep 17 00:00:00 2001 From: L3viathan Date: Mon, 5 Oct 2026 15:23:56 +0200 Subject: [PATCH] Add new modmail category Looking through where the old constant is currently used, we _do_ want to exclude new modmail threads from stats (for the same reason we wanted it for the old one), but we _don't_ want to not set jump URLs for infractions anymore, as these threads will stick around. --- bot/constants.py | 2 ++ bot/exts/info/stats.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bot/constants.py b/bot/constants.py index afbdc6513a..f5983921aa 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -181,6 +181,7 @@ class _Categories(EnvConfig, env_prefix="categories_"): logs: int = 468520609152892958 moderators: int = 749736277464842262 modmail: int = 714494672835444826 + new_modmail: int = 1533613940318146702 appeals: int = 890331800025563216 appeals_2: int = 895417395261341766 voice: int = 356013253765234688 @@ -201,6 +202,7 @@ class _Guild(EnvConfig, env_prefix="guild_"): moderation_categories: tuple[int, ...] = ( Categories.moderators, Categories.modmail, + Categories.new_modmail, Categories.logs, Categories.appeals, Categories.appeals_2 diff --git a/bot/exts/info/stats.py b/bot/exts/info/stats.py index af7663c282..1a4ad0408e 100644 --- a/bot/exts/info/stats.py +++ b/bot/exts/info/stats.py @@ -35,7 +35,10 @@ async def on_message(self, message: Message) -> None: if message.guild.id != Guild.id: return - if is_in_category(message.channel, Categories.modmail): + if ( + is_in_category(message.channel, Categories.modmail) + or is_in_category(message.channel, Categories.new_modmail) + ): if message.channel.id != Channels.incidents: # Do not report modmail channels to stats, there are too many # of them for interesting statistics to be drawn out of this.