K
K
kakashechka2021-04-18 04:07:55
Python
kakashechka, 2021-04-18 04:07:55

How to make embed.set_author, when trying to do it using the guide for November 2020, an error occurs?

Here is the same code, the error is in "_url) ) "

@bot.command()
async def task(ctx, *, content:str):
     embed = discord.Embed(color = 0xff9900, title = f'Задание для жителей', description= f"{content}", embed.set_author(name=ctx.author.display_name, icon_url=ctx.author.avatar_url))
     await ctx.send(embed = embed)


the mistake itself
PS C:\Users\Админ\Desktop\pip> & C:/Users/Админ/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Админ/Desktop/pip/main.py
  File "c:\Users\Админ\Desktop\pip\main.py", line 21
    await ctx.send(embed = embed)
    ^
SyntaxError: positional argument follows keyword argument

I think the question is very stupid, but I do not understand what's going on☺

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
TanderOFF, 2021-04-18
@kakashechka

Why not do so?

embed = discord.Embed(title=f'Задание для жителей', description=f"{content}", color=0xff9900)
embed.set_author(name=ctx.author.display_name, icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question