From a152396ad2d449b0338a89cd40d61bee498806fd Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Sun, 13 Nov 2022 13:05:55 +0000 Subject: Use helper util to determine if snekbox is being invoked in a help post --- bot/exts/utils/snekbox.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot/exts/utils/snekbox.py b/bot/exts/utils/snekbox.py index 5e217a288..190956959 100644 --- a/bot/exts/utils/snekbox.py +++ b/bot/exts/utils/snekbox.py @@ -13,8 +13,9 @@ from discord import AllowedMentions, HTTPException, Interaction, Message, NotFou from discord.ext.commands import Cog, Command, Context, Converter, command, guild_only from bot.bot import Bot -from bot.constants import Categories, Channels, MODERATION_ROLES, Roles, URLs +from bot.constants import Channels, MODERATION_ROLES, Roles, URLs from bot.decorators import redirect_output +from bot.exts.help_channels._channel import is_help_forum_post from bot.log import get_logger from bot.utils import send_to_paste_service from bot.utils.lock import LockedResourceError, lock_arg @@ -456,7 +457,7 @@ class Snekbox(Cog): else: self.bot.stats.incr("snekbox_usages.roles.developers") - if ctx.channel.category_id == Categories.help_in_use: + if is_help_forum_post(ctx.channel): self.bot.stats.incr("snekbox_usages.channels.help") elif ctx.channel.id == Channels.bot_commands: self.bot.stats.incr("snekbox_usages.channels.bot_commands") -- cgit v1.2.3