async def can_run(self, ctx):
original = ctx.command<EOL>ctx.command = self<EOL>try:<EOL><INDENT>if not await ctx.bot.can_run(ctx):<EOL><INDENT>raise CheckFailure('<STR_LIT>'.format(self))<EOL><DEDENT>cog = self.cog<EOL>if cog is not None:<EOL><INDENT>local_check = Cog._get_overridden_method(cog.cog_check)<EOL>if local_check is not None:<EOL><INDENT>ret = await discord.utils.maybe_coroutine(local_check, ctx)<EOL>if not ret:<EOL><INDENT>return False<EOL><DEDENT><DEDENT><DEDENT>predicates = self.checks<EOL>if not predicates:<EOL><INDENT>return True<EOL><DEDENT>return await discord.utils.async_all(predicate(ctx) for predicate in predicates)<EOL><DEDENT>finally:<EOL><INDENT>ctx.command = original<EOL><DEDENT>
|coro|

        Checks if the command can be executed by checking all the predicates
        inside the :attr:`.checks` attribute.

        Parameters
        -----------
        ctx: :class:`.Context`
            The ctx of the command currently being invoked.

        Raises
        -------
        :class:`CommandError`
            Any command error that was raised during a check call will be propagated
            by this function.

        Returns
        --------
        :class:`bool`
            A boolean indicating if the command can be invoked.