Skip to content

Commit

Permalink
Use custom role check to for title command
Browse files Browse the repository at this point in the history
This ensures that if the user doesn't have the defined role, the CheckFailure raised is handled locally the way we want, rather than relying on the error-handler code
  • Loading branch information
ChrisLovering committed Oct 2, 2023
1 parent 13da9b5 commit 65ad33d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bot/exts/help_channels/_cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from bot.bot import Bot
from bot.exts.help_channels import _caches, _channel, _message
from bot.log import get_logger
from bot.utils.checks import has_any_role_check

log = get_logger(__name__)

Expand Down Expand Up @@ -108,7 +109,7 @@ async def rename_help_post(self, ctx: commands.Context, *, title: str) -> None:
# Silently fail in channels other than help posts
return

if not await commands.has_any_role(constants.Roles.helpers).predicate(ctx):
if not await has_any_role_check(ctx, constants.Roles.helpers):
# Silently fail for non-helpers
return

Expand Down

0 comments on commit 65ad33d

Please sign in to comment.