"Fix" /reminder list where there is only one reminder
This commit is contained in:
@ -15,7 +15,7 @@ def create_pages(ctx) -> list[Page]:
|
|||||||
"""Create pages for the paginator.
|
"""Create pages for the paginator.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
ctx (interactions.Context): The context of the command.
|
ctx: The context of the command.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
list[Page]: A list of pages.
|
list[Page]: A list of pages.
|
||||||
|
@ -142,12 +142,15 @@ async def list_command(ctx: interactions.CommandContext):
|
|||||||
|
|
||||||
pages = create_pages(ctx)
|
pages = create_pages(ctx)
|
||||||
if not pages:
|
if not pages:
|
||||||
await ctx.send("No reminders found.")
|
return await ctx.send("No reminders found.", ephemeral=True)
|
||||||
return
|
|
||||||
|
|
||||||
if len(pages) == 1:
|
if len(pages) == 1:
|
||||||
await ctx.send("a")
|
for page in pages:
|
||||||
return
|
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(
|
paginator: Paginator = Paginator(
|
||||||
client=bot,
|
client=bot,
|
||||||
|
Reference in New Issue
Block a user