mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 17:32:31 -05:00
Remove currently deprecated functionality (#5433)
This commit is contained in:
@@ -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]
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user