Remove currently deprecated functionality (#5433)

This commit is contained in:
jack1142
2021-11-02 13:04:45 +01:00
committed by GitHub
parent f071ec09e2
commit 3f4842603b
3 changed files with 3 additions and 95 deletions

View File

@@ -1,12 +1,10 @@
import asyncio
import warnings
from datetime import timedelta
from typing import List, Iterable, Union, TYPE_CHECKING, Dict
import discord
if TYPE_CHECKING:
from .. import Config
from ..bot import Red
from ..commands import Context
@@ -96,21 +94,6 @@ def get_audit_reason(author: discord.Member, reason: str = None, *, shorten: boo
return audit_reason
async def is_allowed_by_hierarchy(
bot: "Red", settings: "Config", guild: discord.Guild, mod: discord.Member, user: discord.Member
):
warnings.warn(
"`is_allowed_by_hierarchy()` is deprecated since Red 3.4.1"
" and will be removed in the first minor release after 2020-11-31.",
DeprecationWarning,
stacklevel=2,
)
if not await settings.guild(guild).respect_hierarchy():
return True
is_special = mod == guild.owner or await bot.is_owner(mod)
return mod.top_role > user.top_role or is_special
async def is_mod_or_superior(
bot: "Red", obj: Union[discord.Message, discord.Member, discord.Role]
):