aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/moderation/dm_relay.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/moderation/dm_relay.py')
-rw-r--r--bot/exts/moderation/dm_relay.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/moderation/dm_relay.py b/bot/exts/moderation/dm_relay.py
index 0d8f340b4..7a3fe49bb 100644
--- a/bot/exts/moderation/dm_relay.py
+++ b/bot/exts/moderation/dm_relay.py
@@ -10,7 +10,7 @@ from bot import constants
from bot.bot import Bot
from bot.converters import UserMentionOrID
from bot.utils import RedisCache
-from bot.utils.checks import in_whitelist_check, with_role_check
+from bot.utils.checks import in_whitelist_check
from bot.utils.messages import send_attachments
from bot.utils.webhooks import send_webhook
@@ -105,10 +105,10 @@ class DMRelay(Cog):
except discord.HTTPException:
log.exception("Failed to send an attachment to the webhook")
- def cog_check(self, ctx: commands.Context) -> bool:
+ async def cog_check(self, ctx: commands.Context) -> bool:
"""Only allow moderators to invoke the commands in this cog."""
checks = [
- with_role_check(ctx, *constants.MODERATION_ROLES),
+ await commands.has_any_role(*constants.MODERATION_ROLES).predicate(ctx),
in_whitelist_check(
ctx,
channels=[constants.Channels.dm_log],