From 2995a457f6fc0b9910fed704eaeb161b8021f917 Mon Sep 17 00:00:00 2001 From: TrustyJAID Date: Sat, 2 Apr 2022 20:27:24 -0600 Subject: [PATCH] Fix AttributeError in new decorators added to requires (#5665) --- redbot/core/commands/requires.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/redbot/core/commands/requires.py b/redbot/core/commands/requires.py index 7a4759def..d64518d83 100644 --- a/redbot/core/commands/requires.py +++ b/redbot/core/commands/requires.py @@ -760,8 +760,8 @@ def bot_can_manage_channel(*, allow_thread_owner: bool = False) -> Callable[[_T] if ctx.guild is None: return False - if not utils.can_manage_channel_in( - ctx.channel, ctx.me, allow_thread_owner=allow_thread_owner + if not utils.can_user_manage_channel( + ctx.me, ctx.channel, allow_thread_owner=allow_thread_owner ): if isinstance(ctx.channel, discord.Thread): # This is a slight lie - thread owner *might* also be allowed @@ -798,8 +798,8 @@ def _can_manage_channel_deco( privilege_level: Optional[PrivilegeLevel] = None, allow_thread_owner: bool = False ) -> Callable[[_T], _T]: async def predicate(ctx: "Context") -> bool: - if utils.can_manage_channel_in( - ctx.channel, ctx.author, allow_thread_owner=allow_thread_owner + if utils.can_user_manage_channel( + ctx.author, ctx.channel, allow_thread_owner=allow_thread_owner ): return True