diff options
| author | 2022-11-13 13:05:55 +0000 | |
|---|---|---|
| committer | 2022-11-25 22:43:45 +0000 | |
| commit | a152396ad2d449b0338a89cd40d61bee498806fd (patch) | |
| tree | f3c31c531152c209dc48da876ecb6a66ab76fe1b | |
| parent | Use 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.py | 5 |
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") |