#Page Buttons fail to work after editing response

1 messages ยท Page 1 of 1 (latest)

winged ledge
#

You are not even sending a message

blazing cairn
humble pawn
#

thats not a message

#

you dont even have to defer, you arent doing anything that takes long

blazing cairn
humble pawn
#

then you need to respond with something first

#

read the guide on paginators

blazing cairn
humble pawn
#

i think paginators have their own p.respond

humble pawn
blazing cairn
blazing cairn
#
@pagetest.command(name="test")
    async def pagetest_test(self, ctx: discord.ApplicationContext):
        await ctx.defer()
        await asyncio.sleep(5)

        pageGroups = [
            pages.PageGroup(
                pages = ["hi", discord.Embed(title="chat")],
                label = "first group",
                description = "test"
            ),
            pages.PageGroup(
                pages = ["hi", "chat"],
                label = "second group",
                description = "test"
            ),
        ]

        pageGroups[0].pages[1].set_thumbnail(url = "attachment://image.png")

        file = discord.File(fp="temp/image.png", filename="image.png")
        message = await ctx.edit(file=file)
        paginator = pages.Paginator(pages=pageGroups, show_menu=True)
        await paginator.edit(message=message)

so im trying to attach image to the second page's embed but buttons dont work ๐Ÿ˜ฆ

humble pawn
#

why do you do asyncio sleep??

edgy lagoonBOT
#
f = discord.File("some_file_path", filename="image.png")
e = discord.Embed()
e.set_image(url="attachment://image.png")
await messagable.send(file=f, embed=e)```
blazing cairn
humble pawn
#

yea but you dont have anything there that takes time.

blazing cairn
humble pawn
#

...why do you replace it in such a misleading way

#

lol

blazing cairn
humble pawn
#

no it isnt lol

#

you are setting the thumbnail

#

i dont think that can use a local file

blazing cairn
#

still doesnt solve the problem with buttons???

humble pawn
#

decide on one problem at once lol