From b611ff92ea69cc1ac6b82aa3f06b9d9675e86a82 Mon Sep 17 00:00:00 2001 From: sco1 Date: Wed, 24 Apr 2019 17:20:30 -0400 Subject: Relint Seasonalbot with new linting rules --- bot/decorators.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'bot/decorators.py') diff --git a/bot/decorators.py b/bot/decorators.py index 15f7fed2..dfe80e5c 100644 --- a/bot/decorators.py +++ b/bot/decorators.py @@ -15,7 +15,6 @@ log = logging.getLogger(__name__) def with_role(*role_ids: int): """Check to see whether the invoking user has any of the roles specified in role_ids.""" - async def predicate(ctx: Context): if not ctx.guild: # Return False in a DM log.debug(f"{ctx.author} tried to use the '{ctx.command.name}'command from a DM. " @@ -35,7 +34,6 @@ def with_role(*role_ids: int): def without_role(*role_ids: int): """Check whether the invoking user does not have all of the roles specified in role_ids.""" - async def predicate(ctx: Context): if not ctx.guild: # Return False in a DM log.debug(f"{ctx.author} tried to use the '{ctx.command.name}' command from a DM. " @@ -52,7 +50,6 @@ def without_role(*role_ids: int): def in_channel(channel_id): """Check that the command invocation is in the channel specified by channel_id.""" - async def predicate(ctx: Context): check = ctx.channel.id == channel_id log.debug(f"{ctx.author} tried to call the '{ctx.command.name}' command. " @@ -69,7 +66,6 @@ def locked(): This decorator has to go before (below) the `command` decorator. """ - def wrap(func): func.__locks = WeakValueDictionary() -- cgit v1.2.3