0
votes

I'm making a bot that prints certain data from a file (using pandas) into an embedded message. That embedded message is a list of data, and I've been trying to update it by using emotes.

For some reason, none of the Stack Overflow answers worked. I've tried multiple fixes like below and they would raise my errors etc. which I wasn't able to fix.

name = await client.send(channel, embed=embed)

name.add_reaction("emote name")

Discord.py version: 1.3.4

Response from bot:

enter image description here

Desired response(s) from bot: enter image description here

code snippet:

                    embed.add_field(name="__**{}**__".format(trend_name2), value="__Level__: **{0}**\n__Category__: **{1}**\n__Position__: **{2}**\n\n**{3}** Trends until **{4}** "
                                                                             "trend\n(**{5} days and {6} hours**)\n\n ‎".format(
                    trend_level2, trend_category2.title(), trend_position2, min(lookup_difference), trend_name2.title(), days_until_trend, hours_until_trend))
                print(lookup_index)
                z += 1
                if z == 6:
                    embed_fields.append(embed)
                    z = 0
                    embed = discord.Embed(title="Level list", color=0x00d9ff)
            page_ = 0
            await message.channel.send(embed=embed_fields[page_])

            # On right arrow reaction clicked:
            #   page += 1
            # On left arrow reaction clicked:
            #   page -= 1
            # Edit message to embed=embed_fields[page_]
            #

`

1

1 Answers

1
votes

Although not your own code, disputils is a really nice library for simple emoji menus like yours: disputils. It's a simple way to make menus, confirmations, and more.