Answer the question
In order to leave comments, you need to log in
Line break in say discord py command?
Hi, I am writing my own discord bot and I am facing this problem..
When I use the ?say Text command, there is no line break in the message from the bot. How can this be fixed?
Here is how it is for me:
And how it should be:
Here is the code:
@client.command()
async def say(ctx, *args):
embed = discord.Embed(description=f" ".join(args), color=0x8A2BE2)
embed.set_image(url="url")
await ctx.send(embed=embed)
Answer the question
In order to leave comments, you need to log in
From the point of view of passing arguments, everything looks logical, the program has no idea where one argument ended and where the second one began, so everything is separated by a space. Wrap the string in quotes, then it will be clear that the text in quotes is one argument. *args
can also be removed in this case.
async def say(ctx, phrase):
embed = discord.Embed(description=phrase, color=0x8A2BE2)
!say "Привет,
мир"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question