I created a code that should send an embed but i get an error: discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
The Embed is not empty and has a title, a description, fields, footer & more
Code
@commands.command(name='claimnitro')
async def claimnitro(self, ctx):
await ctx.message.delete()
first_embed = selfcord.Embed(title="Nitro Generator", description="Please wait until the generated gift is available!", color=0x00ff00)
first_embed.set_thumbnail(url=ctx.author.avatar_url)
first_embed.set_image(url="https://cdn.discordapp.com/attachments/903339334177022007/934510840697208962/free-nitro.gif")
first_embed.add_field(name="Status", value="Claiming Nitro...", inline=False)
first_embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.avatar_url)
second_embed = selfcord.Embed(title="1 Month Discord Nitro Code:", description="", color=0x00ff00)
second_embed.set_thumbnail(url=ctx.author.avatar_url)
second_embed.set_image(url="https://cdn.discordapp.com/attachments/903339334177022007/934510840697208962/free-nitro.gif")
second_embed.add_field(name="Status", value="Claimed an Code!", inline=False)
second_embed.add_field(name="Gift Code", value="[Click me to redeem the Gift](https://www.youtube.com/watch?v=a3Z7zEc7AXQ)", inline=False)
second_embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.avatar_url)
first_message = await ctx.send(embed=first_embed)
second_message = await ctx.send(embed=second_embed)
await first_message.edit(second_message)
Expected Results
I expected it to send it without any error.
Actual Results
The Error above happen
System Information
Python v3.10.0-final
discord.py-self v1.9.1-final
aiohttp v3.7.4.post0
system info: Windows 10 10.0.22000
Checklist
[X] I have searched the open issues for duplicates.
[X] I have shared the entire traceback.
[X] I am using a user token (and it isn't visible in the code).
Summary
Sending a Embed to Discord
Reproduction Steps
I created a code that should send an embed but i get an error:
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
The Embed is not empty and has a title, a description, fields, footer & moreCode
Expected Results
I expected it to send it without any error.
Actual Results
The Error above happen
System Information
Checklist
Additional Information
No response