Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how to fix discord embed showing syntax error

enter image description hereThis is the code for intialising an embed in discord.py .

@client.command(name="games")
        async def games(ctx):
            embed = discord.Embed(
                title="title"
                description="desc"
                color= discord.Color.blue()
        
            )
    
        await ctx.send(embed=embed)

But when I try to run it, it says:

1

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I tried every video and even read the documentation but it dosen’t seem to help. According to it my code is fine. Is there something I am missing or anything else?

Thanks

>Solution :

This is caused because you are not putting a comma after each argument.

@client.command(name="games")
        async def games(ctx):
            embed = discord.Embed(
                title="title",
                description="desc",
                color= discord.Color.blue()
            )
    
        await ctx.send(embed=embed)

This should fix it!

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading