From cb4e67be694fa927f0d1ab862c2c4f0b69931523 Mon Sep 17 00:00:00 2001 From: Stijn De Clercq Date: Thu, 24 Dec 2020 00:13:25 +0100 Subject: [PATCH] Make memes paginated, Fixes #14 --- cogs/fun.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cogs/fun.py b/cogs/fun.py index de38f56..f546aa6 100644 --- a/cogs/fun.py +++ b/cogs/fun.py @@ -1,3 +1,4 @@ +from data import paginatedLeaderboard from decorators import help import discord from discord.ext import commands @@ -162,10 +163,9 @@ class Fun(commands.Cog): memeList = [": ".join([stringFormatters.titleCase(meme[1]), str(meme[2])]) for meme in sorted(memeList, key=lambda x: x[1])] - # Add the fields into the embed - embed = discord.Embed(colour=discord.Colour.blue()) - embed.add_field(name="Meme: aantal velden", value="\n".join(memeList), inline=False) - await ctx.send(embed=embed) + pages = paginatedLeaderboard.Pages(source=paginatedLeaderboard.Source(memeList, "Memes", discord.Colour.blue()), + clear_reactions_after=True) + await pages.start(ctx) @commands.command(name="Pjoke") @help.Category(category=Category.Fun)