Sending messages on Discord is simple. You type the characters in the message field and click or press “Send.” No need to be knowledgeable about coding for this purpose.
But if you want your messages to stand out, you need to use Discord code blocks, which you’ll learn how to add below.
How to Use Discord Code Blocks
To use Discord code blocks, follow these steps:
- Open Discord and click on a server
- Click on a text channel where you have message permissions
- Type a single backtick (`) for a single line of code or 3 backticks (“`) for multiple lines of code into the message field
- Type your message after the backtick
- Close the message block with another backtick (or 3 backticks)
- Press “Enter” on the keyboard
Step 1: Open Discord and click on a server
You’ll find the server icons (both those you have joined without an invite or with one) on the left-side panel of the Discord app or page.
All the channels of the server, both text and voice, are then seen on the object panel.
Step 2: Click the text channel you have message permissions
Having message permissions is important as you won’t be able to send or even type a message if you’re not allowed to do so.
In effect, you can’t use code blocks if you can’t type a message.
Step 3: Type a backtick or 3 backticks in the message field
To do this, click inside the message field and tap the backtick key, which is found below “Escape” and “1” on the keyboard.
For adding a single line code block, then add 1 backtick.
If, however, you want to enter multiple line code blocks, then type 3 backlinks.
Step 4: Type the message after the backtick or backticks you added
Whether you add a single-line or multiple-line code block, you don’t need to add a space between the backticks and the text.
For multiple-line code blocks, add a new line by pressing “Shift” and “Enter” on the keyboard.
Step 5: Close the message with a backtick or 3 backticks
Like the previous step, no need to add a space between the last letter of the text or message with the backticks.
For single-line code blocks, add a single backtick still. For multiple-line code blocks, add 3 backticks.
Step 6: Press the “Enter” key
This will make the text you added have a different background color than regular messages in the text channel.
But this will only happen if you correctly format the code block.
How to Use Discord Code Blocks on Discord Mobile
To use Discord code blocks on mobile devices, follow these steps:
- Launch Discord and tap a server
- Tap on a text channel where you have message permissions
- Insert one backtick for a single line of code (`) or 3 backticks for multiple lines of code (“`)
- Type your message after the backtick/s you entered
- Close the message with 1 or 3 backticks depending on the length of your code
- Tap the “Enter” key to send the message
The process for using Discord code blocks on the mobile app is similar when done on a computer.
You only have to find the right buttons to push depending on the phone model you’re using.
Step 1: Open Discord and tap a server
You can find all the servers you have access to on the left-side panel.
An object panel with all the text and voice channels of that server will then appear.
Step 2: Press the text channel you have message permissions
If you don’t have message permissions on a particular text channel, you can’t send or reply to messages.
The text channel’s chat room then opens.
Step 3: Type the backtick or backticks in the message field
To do this, press on the message field to make the blinking cursor appear. Then find the backtick button on the onscreen keyboard.
On iPhones, you have to press the “123” key first then long-press on the apostrophe (‘) key. A floating menu will then appear.
Tap the backtick key once for single-line code blocks. If you’re adding multiple-line code blocks, repeat long-pressing the apostrophe (‘) key and the backtick key 3 times.
On Android phones, tap the “?123” and “=\<” keys to find the backtick key.
Then press once on the backtick key for single-line code blocks and three times for multiple-line code blocks.
Step 4: Type the message after the backticks added
Don’t add a space between the backtick and the message for the code block to be formatted correctly.
For multiple-line code blocks, press the “Return” (iPhone) or “Enter” (Android) keys to add another line.
Step 5: Close the message with backticks
Add a single backtick for single-line code blocks and three backticks for multiple-line code blocks.
Don’t add a space between the last letter of the text and the backtick.
Step 6: Tap the “Enter” key
This will send the new message to the text channel with a differently-colored background.
But if you don’t want to format your message as a code block, you can always make the text bigger in Discord.
How to Change the Color of Discord Code Blocks
By default, Discord’s code blocks are black. Now, if you want to change this to a more vibrant color, you only need to add text or symbols on top of the backticks.
But for this to happen, you have to use a multi-line code block format even if you only have a single line of text added.
Refer to the formulae featured below to change the color of Discord code blocks.
Note: We can’t display the backticks as regular text due to a formatting issue, so we had to use screenshots instead to show you how it is done (see below).
Here’s an explanation for you, though:
For instance, to change the color to red, you would simply input 3 backticks, then write diff and then a dash, followed by the rest of your text and 3 backticks at the very end, just as explained in the screenshot below.
Red
On Discord, it looks like this:
Orange
On Discord, it looks like this:
Green
On Discord, it looks like this:
Blue
On Discord, it looks like this:
Cyan
On Discord, it looks like this:
Frequently Asked Questions about How to Use Discord Code Blocks
How is a code block different from a markdown in Discord?
Code blocks in Discord change the text’s background of the messages you’re sending. Markdown, on the other hand, uses code to change the formatting of the text itself. You can make the text have a bold, italic, or underlined format with markdown.
Can you make the text inside the code blocks in Discord colored?
If you’re using Discord on a computer, you can make the text inside multi-line code blocks colored. You can do this by adding symbols within the code block’s text. If you want orange-colored text, add “arm” and underscores to the text or enclose the text within brackets for blue-colored text.
Hey guys! It’s me, Marcel, aka Maschi. On MaschiTuts, it’s all about tutorials! No matter the topic of the article, the goal always remains the same: Providing you guys with the most in-depth and helpful tutorials!