It does, but only if you make your code block into its own post as a "text snippet." (I assume this is because Slack's internal markup doesn't allow regions to have parameterized metadata, but there is parameterized metadata at the chat-post-event level.)
You also get other benefits of doing this, e.g. being able to collapse the snippet, download it, etc. Code pasted into Slack should really always be pasted as a snippet. I just wish it auto-detected you were trying to do that and offered to make a snippet.
Not even remotely.
Discord supports:
* fenced code blocks (but not indentation)
* quoting, a single level (nested quotes don't work, properly replying to other comments is painful)
* inline decorations (italics, bold, underline, strikethrough, code)
* inline spoilers (an extension)
* disabling autolinking (an other extension)
It doesn't support: headings, paragraphs, lists (ordered or not), labelled links, tables, images, footnotes, images (you can only use the image upload feature which puts a single image below a comment).
It also has a limit to 2000 char (4000 with nitro), which can be rather low when posting code snippets.
No bulleted lists... that's disappointing.
Maybe worth upvoting:
https://support.discord.com/hc/en-us/community/posts/3600400...
My experience of the community forums is it’s only worth if you like venting or seeing people vent, the folks in charge of discord really don’t care.
Slack does not support syntax highlighting of code blocks.
Discord uses proper markdown and supports syntax highlighting.
These are two things that make me think Discord is better specifically for engineers, aside from it just being generally way better.