#paginator example

1 messages · Page 1 of 1 (latest)

primal sapphire
#

i copied the paginator example and I get this error,

Traceback (most recent call last):
  File "/usr/app/vroles/cogs/commands.py", line 237, in embed_variables
    await inter.send(embeds=embeds[0], view=Menu(embeds))
  File "/usr/local/lib/python3.8/site-packages/disnake/interactions/base.py", line 635, in send
    await sender(
  File "/usr/local/lib/python3.8/site-packages/disnake/interactions/base.py", line 905, in send_message
    raise ValueError("embeds cannot exceed maximum of 10 elements")
ValueError: embeds cannot exceed maximum of 10 elements
    @embed.sub_command(name="variables")
    async def embed_variables(self, inter: disnake.ApplicationCommandInteraction):
        """Shows a list of options to use in customizing your embed"""
        await inter.response.defer(with_message=True, ephemeral=True)
        embeds = [disnake.Embed(
            title="Embed Description Variables",
            description="These are the variables you can use in your embed description, some are also usable in the footer.\n\n**`{guild.vanity_url_code}`** - shows your vanity codes\n**`{guild.approximate_member_count}`** - Shows your server member count\n**`{member.mention}`** - mentions the member\n**`{member.name}`** - show the members name",
            color=disnake.Color.green(),
        ),
            disnake.Embed(
                title="Embed Thumbnail Variables",
                description="These are the variables you can use in your embed thumbnail.\n\n**`{member_avatar}`** - shows the members avatar\n**`{guild_icon}`** - shows the guilds icon",
            )
        ]
        await inter.edit_original_message(embeds=embeds[0], view=Menu(embeds))
modest delta
#

You're only passing one embed to embeds. Not sure if it matters but ...

primal sapphire
#

yeeee it's cause u only want the first embed to show. its a paginator

modest delta
#

Yeah but embed=embeds[0]

#

I've never used embeds so I assumed it expects a list.

primal sapphire
#

oh shit i didn't even notice lmao