[V3] permissions canrun fix (#1787)

* permissions canrun fix

* Missing await

* async gen
This commit is contained in:
Michael H 2018-06-05 16:33:45 -04:00 committed by palmtree5
parent 4aaef9558a
commit 8916f55d52

View File

@ -195,7 +195,9 @@ class Permissions:
else: else:
try: try:
testcontext = await self.bot.get_context(message, cls=commands.Context) testcontext = await self.bot.get_context(message, cls=commands.Context)
can = await com.can_run(testcontext) can = await com.can_run(testcontext) and all(
[await p.can_run(testcontext) for p in com.parents]
)
except commands.CheckFailure: except commands.CheckFailure:
can = False can = False