async def action_igdb_query(self, context: Context, query: str, endpoint: str = 'games', success=None, fail=None): if not query: await execute_action(context, fail) return query = context.render_template(query) results = await self.query(endpoint=endpoint, query=query) if not results: await execute_action(context, fail) return context.local['results'] = results await execute_action(context, success)
async def _fn(ctx: Context): return bool(ctx.render_template(condition))
async def _fn(ctx: Context): print(ctx.render_template(value)) return True
async def _fn(ctx: Context): ctx.local[var] = ctx.render_template(value) return True
def evaluate(self, context: Context) -> str: return context.render_template(self.template, resolve_emoji=self.resolve_emoji)