Make your everyday texting more exciting and flavoursome with the markdown feature used by Discord. Ever happened that you join your very first Discord channel, and you have no clue how people were typing in italics, in bold, in colours, underlines, and strikethrough?
As you must know, Discord, running on macOS, iOS, Linux, Android, Windows, and in web browsers, is a proprietary freeware VoIP application and digital distribution forum crafted for the video gaming public. It takes a specialization in image, audio, video, and text communication between users in a chat channel.
Even though the software has no monetary value attached, the developers monetized it with paid customization options like emojis and stickers. Besides, there is a constant debate for choosing light and dark themes. Discord also backs markdown, which is the symbol-based formatting one applies to messages to subject it to some effects like italicization or bolding. It can also be referred to as the lightweight and sleek machine working in the background that is responsible for all the formatting of your text.
John Gruber and Aaron Swartz developed Markdown in 2004. It is chiefly a markup language crafted to be comprehensible. Markdown has been used as a tool to format mainly forum discussions and readme files and also to convert plain texts to rick texts in simple text editors.
They are the most commonly used tricks like writing your texts within single or double asterisks (*for example* or **, for example,**) or underlines (_for example_), spoiler tags (||for example||), quotes (> for instance), strikethroughs (~~, for example, ~~), and single-line code blocks (‘for example’).
Code blocks are perhaps the most versatile markdown supported by Discord among the rest. Note that you need not be a coder to use code blocks. Here, we are going to discuss in detail what code blocks are and how one can use them to develop colour messages in Discord.
In case you do not want to be using markdown, what you can do is slap a backslash before you begin your sentence, or you could also put your message in code blocks. Although, remember that it does not work for words with underscores or edits.
What are the Code Blocks?
Code blocks, also called code boxes, are a type of markdown supported by the rendering engine of Discord. So, understand that to add color to a text or change the existing color, you have to encapsulate the text in the code block. This indicates that now your code would be a block of three-line text with the first line having “‘,” followed by your book and ending with “‘” again.
Discord supports both single-line and multi-line code blocks.
What the single-line code block does to make it easier and convenient for the Discord users to share small snippets of readably formatted code is add a dark background to the white, moonscape text.
On the other hand, with multi-line code blocks, you can effectively share more complicated codes stretching over several lines. To create multi-line blocks, what you got to do is surround your text with triple backticks, for instance, “‘ for example.”‘ Once you have followed this, a large dark box will form around your text. You can format it in a moonscape font and then follow it up by saving all indentations. The feature of multi-line code blocks that sets it apart from all other markdown is that it supports syntax highlighting.
Syntax highlighting in Code Blocks in Discord
You are most likely to find this feature in Notepad substitutes like Sublime Text or Notepad++ and text editors. With the help of syntax highlighting, coders can effectively add definition to the programming language of a document. This way, it will become more convenient and understandable for the readers to focus on the more essential elements as they will be marked in colour. To add syntax highlighting to your multi-line code blocks, after the first set of triple backticks, you have to input a keyword, like:
“‘MD; the keyword <md> is used to format your code blocks with basic markdown.
Another example of syntax highlighting would include <JSON> and <Python>.
What is the most frequently used discord code block syntax highlighting styles?
- Apache syntax highlighting to get a yellow text (limitation: no spacing)
- Bash for Dark Green
- Fix turns text to yellow by default.
- In syntax highlighting for BLUE
- Diff for light green text (add a + sign before your text); for the red text, add a – before your text.
- CSS for Blue (limitation: no spaces); also for light green provided you wrap your text with “; for red-orange (surround your text with )
- JSON syntax highlighting for Dark Green
Well, as you can see, most of these codes have limitations like, for instance, you have to write the text without any spaces. You can either write “Welcometothejungle” or “Welcome_to_the_jungle.” This is because using highlighting syntax; we are exploiting it to highlight our Discord messages. We are tricking the multi-line code block into thinking that our text is the programming code literally. Usually, the colours are included in the variables which cannot contain spaces.
A Final Word
Maybe with time, Discord will introduce newer options for syntax highlighting. This is perhaps the only option available to create discord colour messages even though it might not be as clean as having the choice to change the text colour directly in terms of implementation. The options already available are many, so being sure to try out code blocks if you were to format a large chunk of text for enhanced comprehensibility.