I have a list with newlines as variable called result
['**Status: **Enabled\n**Q: **What is 2 + 2?\n **\\ A: **4\n\n**Author: **UltimateDucc#9121\n\n\n', '**Status: **Enabled\n**Q: **Where is Ethiopia?\n **\\ A: **Africa\n\n**Author: **BigSnacc#2466\n\n\n']
When I send it as an embedded message through discord:
l_msg = discord.Embed(
title = f'Page {list_msg}',
description = str(result),
colour = discord.Colour.blue()
)
await message.channel.send(embed = l_msg)
It comes out as this with every \n
being ignored for whatever reason.
Any help is appreciated.
You need to convert the individual list entries into strings as opposed to just a string representation of the entire list. This is done with str.join().
Try changing the description line to:
description=''.join(result),
Result:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With