aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-11-13 13:05:55 +0000
committerGravatar Chris Lovering <[email protected]>2022-11-25 22:43:45 +0000
commita152396ad2d449b0338a89cd40d61bee498806fd (patch)
treef3c31c531152c209dc48da876ecb6a66ab76fe1b
parentUse help channel util from help channels cog (diff)
Use helper util to determine if snekbox is being invoked in a help post
-rw-r--r--bot/exts/utils/snekbox.py5
1 files 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")