|
5 | 5 | from async_rediscache import RedisCache |
6 | 6 | from dateutil.parser import isoparse, parse as dateutil_parse |
7 | 7 | from discord import Member |
8 | | -from discord.ext.commands import BadArgument, Cog, Context, group, has_any_role |
| 8 | +from discord.ext.commands import BadArgument, Cog, Context, group |
9 | 9 | from pydis_core.utils.members import get_or_fetch_member |
10 | 10 | from pydis_core.utils.scheduling import Scheduler |
11 | 11 |
|
12 | 12 | from bot.bot import Bot |
13 | | -from bot.constants import Emojis, Guild, MODERATION_ROLES, Roles |
| 13 | +from bot.constants import Emojis, Guild, Roles |
14 | 14 | from bot.converters import Expiry |
15 | 15 | from bot.log import get_logger |
16 | 16 | from bot.utils.time import TimestampFormats, discord_timestamp |
@@ -44,7 +44,7 @@ def __init__(self, bot: Bot): |
44 | 44 |
|
45 | 45 | async def cog_check(self, ctx: Context) -> bool: |
46 | 46 | """Only allow moderators to invoke the commands in this cog.""" |
47 | | - return await has_any_role(*MODERATION_ROLES).predicate(ctx) |
| 47 | + return ctx.author.get_role(Roles.mod_team) is not None |
48 | 48 |
|
49 | 49 | async def cog_load(self) -> None: |
50 | 50 | """Schedule both when to reapply role and all mod ping schedules.""" |
|
0 commit comments