how to fix discord embed showing syntax error

Question:

This is the code for initializing 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:

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

Thanks

Asked By: Aryan Gupta

||

Answers:

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!

Answered By: cheekysim
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.