"Fix" /reminder list where there is only one reminder

This commit is contained in:
2022-09-18 02:25:36 +02:00
parent 8e6aedc1e2
commit 5e7c4af020
2 changed files with 8 additions and 5 deletions

View File

@ -142,12 +142,15 @@ async def list_command(ctx: interactions.CommandContext):
pages = create_pages(ctx)
if not pages:
await ctx.send("No reminders found.")
return
return await ctx.send("No reminders found.", ephemeral=True)
if len(pages) == 1:
await ctx.send("a")
return
for page in pages:
return await ctx.send(
content="I haven't added support for buttons if there is only one reminder, "
"so you need to add another one to edit/delete this one 🙃",
embeds=page.embeds,
)
paginator: Paginator = Paginator(
client=bot,