Programming a Discord bot in Python- How do I indent in embeds?

Viewed 259

I've been trying to figure out how to indent (go down a line) in embeds. I am aware of embed.add_field, but that's not quite what I want. It creates a title with some text below it. I want a new line of text, no title.

2 Answers

You can't leave the fields blank, nor is there a other fields you can use to circumvent the "subtitle" text, as it must be provided, but here are some ways to get around this,

In this example, you can just use the bold font decorator in the field you don't want, you can also use the unicode blank character which would also appear as a blank field.

     embed = discord.Embed(title='title', color=0xffbf00)
     embed.add_field(name='sub-title', value='** **', inline=False)
     embed = discord.Embed(title='title', color=0xffbf00)
     embed.add_field(name='\u200b', value='Item 1', inline=False)

Intead, if you would like to have a list, you could just the multi line strings, which would make the content seem as if they were without the sub-title

     embed = discord.Embed(title='title', color=0xffbf00)
     embed.add_field(name='\u200b', value='''
     test
     test
     test
     test
     test''', inline=False)
embed = discord.Embed(title='title', description='description', color=discord.Color.anycolor)

The description line is posted under the title, and if that doesn't work for what you want using \n anywhere in your code will make it like a return function to the next line.

If this doesn't work you can contact me on discord at killrebeest#7187 or comment to this answer! Have a great day!

Related