ColeTMK
ColeTMK

Reputation: 74

Problem with sending embeds for help command with pages

I was following I want to make a multi-page help command using discord.py but wanted to have embeds instead of messages for my help command. So far for testing I have..

@commands.command()
async def help(self, ctx):
        oneembed=discord.Embed(title="test1", color=0xAF0735)
        twoembed=discord.Embed(title="test2", color=0xAF0735)
        contents = [oneembed, twoembed]
        pages = 4
        cur_page = 1
        message = await ctx.send(embed=f"{contents[cur_page-1]}")

When i type the help command, it sends Page 1/4: <discord.embeds.Embed object at 0x0000018E68E98C10>

How can I get this to send the actual embed instead of the object?

Upvotes: 0

Views: 221

Answers (1)

Abdulaziz
Abdulaziz

Reputation: 3426

You should pass it as an embed like this

await ctx.send(embed=contents[cur_page-1])

TextChannel.send

Upvotes: 1

Related Questions