File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 63
63
from ..role import Role
64
64
from ..threads import Thread
65
65
from ..user import User
66
- from ..utils import async_all , find , utcnow
66
+ from ..utils import async_all , find , utcnow , maybe_coroutine
67
67
from .context import ApplicationContext , AutocompleteContext
68
68
from .options import Option , OptionChoice
69
69
@@ -367,6 +367,14 @@ async def can_run(self, ctx: ApplicationContext) -> bool:
367
367
# parent checks should be run first
368
368
predicates = self .parent .checks + predicates
369
369
370
+ cog = self .cog
371
+ if cog is not None :
372
+ local_check = cog ._get_overridden_method (cog .cog_check )
373
+ if local_check is not None :
374
+ ret = await maybe_coroutine (local_check , ctx )
375
+ if not ret :
376
+ return False
377
+
370
378
if not predicates :
371
379
# since we have no checks, then we just return True.
372
380
return True
You can’t perform that action at this time.
0 commit comments