diff options
| author | SnowyLuma <[email protected]> | 2019-05-13 14:41:30 +0200 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2019-05-13 20:29:07 -0400 |
| commit | 859ee751f9aa72f9fa95d6c33fa094bc9c551efb (patch) | |
| tree | 1961e549f90b74b8359c79b79d1941076f1ed90d | |
| parent | Add India region to VoiceRegion (diff) | |
| download | discord.py-859ee751f9aa72f9fa95d6c33fa094bc9c551efb.tar.xz discord.py-859ee751f9aa72f9fa95d6c33fa094bc9c551efb.zip | |
[tasks] Return coro from before and after decorators
| -rw-r--r-- | discord/ext/tasks/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py index ad52f549..b7b15f1d 100644 --- a/discord/ext/tasks/__init__.py +++ b/discord/ext/tasks/__init__.py @@ -271,7 +271,7 @@ class Loop: raise TypeError('Expected coroutine function, received {0.__name__!r}.'.format(type(coro))) self._before_loop = coro - + return coro def after_loop(self, coro): """A decorator that register a coroutine to be called after the loop finished running. @@ -299,6 +299,7 @@ class Loop: raise TypeError('Expected coroutine function, received {0.__name__!r}.'.format(type(coro))) self._after_loop = coro + return coro def loop(*, seconds=0, minutes=0, hours=0, count=None, reconnect=True, loop=None): """A decorator that schedules a task in the background for you with |