From dcf826c09b4fe849143349d1583d65c0e06c7629 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 13 Feb 2017 20:58:14 -0500 Subject: [PATCH] Allow utils.maybe_coroutine to take any arguments. --- discord/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/discord/utils.py b/discord/utils.py index fe1129d70..5177b1c8b 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):