I
I
Ilya2021-08-11 13:18:17
Python
Ilya, 2021-08-11 13:18:17

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: 6113a38dc0eb4862554285.png

And how it should be: 6113a3b8e4b5a015353791.png

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)


Thanks in advance everyone for your reply

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
soremix, 2021-08-11
@keanoz

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. *argscan also be removed in this case.

async def say(ctx, phrase):
    embed = discord.Embed(description=phrase, color=0x8A2BE2)

!say "Привет,
мир"

T
TanderOFF, 2021-08-11
@TanderOFF

Try yours

text /n next line .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question