Remove usage of loop arg in calls to start_adding_reactions (#3644)

* fix stacklevels of warnings

* stop using loop arg when calling start_adding_reactions

* [Audio] Stop using loop arg when calling start_adding_reactions
This commit is contained in:
jack1142
2020-03-20 20:44:57 +01:00
committed by GitHub
parent 5074f2dbab
commit eebea59fe3
6 changed files with 18 additions and 8 deletions

View File

@@ -56,6 +56,7 @@ def is_mod_or_superior(ctx: "Context") -> Awaitable[bool]:
"`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)
@@ -65,6 +66,7 @@ def is_admin_or_superior(ctx: "Context") -> Awaitable[bool]:
"`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)
@@ -72,6 +74,8 @@ def is_admin_or_superior(ctx: "Context") -> Awaitable[bool]:
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`."
"release, please use `redbot.core.utils.mod.check_permissions`.",
DeprecationWarning,
stacklevel=2,
)
return _check_permissions(ctx, perms)