From 2c50894f250c0979fb45894e23e94fb90be107ce Mon Sep 17 00:00:00 2001 From: bmintz Date: Thu, 20 Dec 2018 07:48:16 +0000 Subject: [PATCH] jsk command: support yielding PaginatorInterfaces makes the code sample in #22 a lot shorter --- jishaku/cog.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jishaku/cog.py b/jishaku/cog.py index 2e6c4016..8d5f7100 100644 --- a/jishaku/cog.py +++ b/jishaku/cog.py @@ -278,6 +278,8 @@ async def jsk_python(self, ctx: commands.Context, *, argument: CodeblockConverte await ctx.send(file=result) elif isinstance(result, discord.Embed): await ctx.send(embed=result) + elif isinstance(result, PaginatorInterface): + await result.send_to(ctx) else: if not isinstance(result, str): # repr all non-strings