예제 #1
0
 async def math_execute(self):
     t = False
     for arg in self.args:
         t = truthy(await self.evaluate(arg))
         if not t:
             return False
     return t
예제 #2
0
    async def execute(self):
        lsargs, rsargs = self.eqsplit_args(self.args)
        obj, attr_name, err = self.target_obj_attr(
            await self.parser.evaluate(lsargs), default=self.executor)
        if err:
            self.executor.msg(Text(err))

        actions = await self.get_attr(obj, attr_name=attr_name)

        if not truthy(actions):
            self.executor.msg(
                f"{self.name} cannot use that attribute. Is it accessible, and an action list?"
            )

        number_args = [
            await self.parser.evaluate(arg)
            for arg in self.split_cmd_args(rsargs)
        ]
        await self.entry.inline(actions,
                                nobreak="nobreak" in self.switches,
                                number_args=number_args)
예제 #3
0
 async def math_execute(self):
     for arg in self.args:
         if truthy(await self.evaluate(arg)):
             return True
     return False
예제 #4
0
 async def math_execute(self):
     return any([truthy(await self.evaluate(arg)) for arg in self.args])
예제 #5
0
 async def math_execute(self):
     return truthy(await self.evaluate(self.args[0]))