diff options
| author | 2020-07-17 13:22:40 -0700 | |
|---|---|---|
| committer | 2020-07-31 22:58:06 -0700 | |
| commit | 0c03950cd4a4d1c8734e2a7172344dd073d3d188 (patch) | |
| tree | fa00b2a4b91fa2b81fadda7c50419caeace3b4e1 | |
| parent | Decorators: add logging for mutually_exclusive (diff) | |
Decorators: clarify use of mutually_exclusive with commands
| -rw-r--r-- | bot/decorators.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/decorators.py b/bot/decorators.py index 91104fc6c..f581e66d2 100644 --- a/bot/decorators.py +++ b/bot/decorators.py @@ -110,6 +110,8 @@ def mutually_exclusive(namespace: t.Hashable, resource_id: ResourceId) -> t.Call `resource_id` identifies a resource on which to perform a mutually exclusive operation. It may also be a callable or awaitable which will return the resource ID given the decorated function's args and kwargs. + + If decorating a command, this decorator must go before (below) the `command` decorator. """ def decorator(func: t.Callable) -> t.Callable: name = func.__name__ |