aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-03-26 21:17:55 +0100
committerGravatar kwzrd <[email protected]>2020-03-26 21:26:04 +0100
commitc04103b99e0970ac1d4088f1230b3484c71dbee9 (patch)
treebf516b5d5ee00b87ef9d3277a1790ba99a4d10e9
parentDeseasonify: add 'task' alias to daemon group (diff)
Deseasonify: extend `in_month` doc
-rw-r--r--bot/decorators.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/decorators.py b/bot/decorators.py
index 0a1f77c8..f85996b5 100644
--- a/bot/decorators.py
+++ b/bot/decorators.py
@@ -118,6 +118,11 @@ def in_month(*allowed_months: Month) -> t.Callable:
the decorated callable is a cmd or listener, it **has** to first be turned
into one. This means that this decorator should always be placed **above**
the d.py one that registers it as either.
+
+ This will decorate groups as well, as those subclass Command. In order to lock
+ all subcommands of a group, its `invoke_without_command` param must **not** be
+ manually set to True - this causes a circumvention of the group's callback
+ and the seasonal check applied to it.
"""
def decorator(callable_: t.Callable) -> t.Callable:
# Functions decorated as commands are turned into instances of `Command`