From 896d5e92001cd01e9efc7797f27d5970c72e296b Mon Sep 17 00:00:00 2001 From: Draper <27962761+Drapersniper@users.noreply.github.com> Date: Thu, 13 Apr 2023 22:15:22 +0100 Subject: [PATCH] Remove deprecated checks in checks module (#6016) --- redbot/core/checks.py | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/redbot/core/checks.py b/redbot/core/checks.py index 463dc60b9..6ced152f1 100644 --- a/redbot/core/checks.py +++ b/redbot/core/checks.py @@ -1,6 +1,3 @@ -import warnings -from typing import Awaitable, TYPE_CHECKING, Dict - from .commands import ( bot_has_permissions, bot_in_a_guild, @@ -13,14 +10,7 @@ from .commands import ( mod, mod_or_permissions, ) -from .utils.mod import ( - is_mod_or_superior as _is_mod_or_superior, - is_admin_or_superior as _is_admin_or_superior, - check_permissions as _check_permissions, -) -if TYPE_CHECKING: - from .commands import Context __all__ = [ "bot_has_permissions", @@ -33,37 +23,4 @@ __all__ = [ "admin_or_permissions", "mod", "mod_or_permissions", - "is_mod_or_superior", - "is_admin_or_superior", - "check_permissions", ] - - -def is_mod_or_superior(ctx: "Context") -> Awaitable[bool]: - warnings.warn( - "`redbot.core.checks.is_mod_or_superior` is deprecated and will be removed in a future " - "release, please use `redbot.core.utils.mod.is_mod_or_superior` instead.", - category=DeprecationWarning, - stacklevel=2, - ) - return _is_mod_or_superior(ctx.bot, ctx.author) - - -def is_admin_or_superior(ctx: "Context") -> Awaitable[bool]: - warnings.warn( - "`redbot.core.checks.is_admin_or_superior` is deprecated and will be removed in a future " - "release, please use `redbot.core.utils.mod.is_admin_or_superior` instead.", - category=DeprecationWarning, - stacklevel=2, - ) - return _is_admin_or_superior(ctx.bot, ctx.author) - - -def check_permissions(ctx: "Context", perms: Dict[str, bool]) -> Awaitable[bool]: - warnings.warn( - "`redbot.core.checks.check_permissions` is deprecated and will be removed in a future " - "release, please use `redbot.core.utils.mod.check_permissions`.", - DeprecationWarning, - stacklevel=2, - ) - return _check_permissions(ctx, perms)