Skip to content

Commit

Permalink
jsk command: support yielding PaginatorInterfaces
Browse files Browse the repository at this point in the history
makes the code sample in #22 a lot shorter
  • Loading branch information
ioistired authored and Gorialis committed Dec 23, 2018
1 parent 6f5dcb1 commit 09e6699
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jishaku/cog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09e6699

Please sign in to comment.