diff options
| author | Rapptz <[email protected]> | 2017-02-13 20:58:14 -0500 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2017-02-13 20:58:14 -0500 |
| commit | dcf826c09b4fe849143349d1583d65c0e06c7629 (patch) | |
| tree | 394205f9117dca3b1f3d69c1d96cfb8be8e3771b | |
| parent | Add support for limit=None in Messageable.history. (diff) | |
| download | discord.py-dcf826c09b4fe849143349d1583d65c0e06c7629.tar.xz discord.py-dcf826c09b4fe849143349d1583d65c0e06c7629.zip | |
Allow utils.maybe_coroutine to take any arguments.
| -rw-r--r-- | discord/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/discord/utils.py b/discord/utils.py index fe1129d7..5177b1c8 100644 --- a/discord/utils.py +++ b/discord/utils.py @@ -261,11 +261,11 @@ def to_json(obj): return json.dumps(obj, separators=(',', ':'), ensure_ascii=True) @asyncio.coroutine -def maybe_coroutine(f, e): +def maybe_coroutine(f, *args, **kwargs): if asyncio.iscoroutinefunction(f): - return (yield from f(e)) + return (yield from f(*args, **kwargs)) else: - return f(e) + return f(*args, **kwargs) @asyncio.coroutine def async_all(gen): |