aboutsummaryrefslogtreecommitdiffstats
path: root/bot/decorators.py
diff options
context:
space:
mode:
authorGravatar sco1 <[email protected]>2019-04-24 17:20:30 -0400
committerGravatar sco1 <[email protected]>2019-04-24 17:20:30 -0400
commitb611ff92ea69cc1ac6b82aa3f06b9d9675e86a82 (patch)
tree0fdb47359609c44479a331b5684dcb3d50a1ff56 /bot/decorators.py
parentRemove docstring newline linting from ignored codes (diff)
Relint Seasonalbot with new linting rules
Diffstat (limited to 'bot/decorators.py')
-rw-r--r--bot/decorators.py4
1 files changed, 0 insertions, 4 deletions
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()