Making a table format on Discord
by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/making-a-table-format-on-discord Hello, this is @joviansummer. My code revision of the automated missed-block reporter for witness Discord channel continues. After implementing mentioning(pinging) capability , I'm trying to convert reporting format to tabular form. It was requested by witness @steemchiller). On Steemit, creating a table is easy thanks to markdown table support. On Discord, unfortunately, table is not supported. Discord only supports a limited subset of markdown and table is not available. Thus, it seems the only way to make something similar is to use code block. In code block, text alignment possible because every character occupies the same width. You can see the difference from the screenshot below: Now, I need to make sure each field occupies pre-determined length. Thankfully, python provides a really useful capability called f-string. Here is an example. name = '@joviansumm