This article explains how to create a line or block of code in Discord chat. You can do this on the desktop and mobile versions of the program.
Steps
Method 1 of 2: On Desktop
Step 1. Open Discord
Click on the program icon, which features the white app logo on a purple background. The Discord chat window you are connected to will open.
If you are not logged in, enter your email, password and click Log in.
Step 2. Select a channel
Click on the one in which you want to write the message in the upper left part of the window.
Step 3. Click on the text field
You'll find it at the bottom of the Discord window.
Step 4. Write a backtick (`)
Usually this key is not present on Italian keyboards, so you have to enter it with a combination of keys. Press alt="Image" + 0096 and the backtick will appear in the text field.
If you want to create a code block, skip this step and the next three
Step 5. Write the text to be formatted
Type the word or phrase you want to insert as a line of code.
Step 6. Insert another backtick
You should now see one of these characters on either side of the text you want to send as a code.
For example, if you are trying to apply the desired format to the phrase "Long live mom", you should read in the text field `Long live mom`
Step 7. Press Enter
The message will be formatted and sent.
Step 8. Create a block of code
If you want to send a code example (such as an HTML page) to another user on Discord, you can type three backticks (``) before and after the text, then press Enter.
- For example, to format the code "" as a block, type `` `` `on Discord then press Enter.
- If you want to set a specific language for the code block, type the three backticks, write the language (e.g. css) in the first line, create a new line, then add the rest of the code before inserting the final three backticks.
Method 2 of 2: On Mobile Devices
Step 1. Open Discord
Tap the app icon, which features the white Discord logo on a purple background. If you are logged in to your account, the chat page will open.
Step 2. Select a channel
Click on the one where you want to send the message.
Step 3. Press the text field
You will see it at the bottom of the screen.
Step 4. Type a backtick
You can enter it in various ways, depending on your phone:
- iPhone: Press 123 in the lower left corner of the keyboard, press and hold the apostrophe above the "Enter" button, then tap the left backtick icon (`) with your finger.
- Android: Press !#1 at the bottom left of the keyboard, then hold down the apostrophe and select the backtick icon `.
- If you want to create a code block, skip this step and the next three.
Step 5. Write the text to be formatted
Step 6. Type another backtick
You should now have one of these characters on both sides of the text.
For example, if you want to code the phrase "Hello world!", Type in the text field `Hello world!`
Step 7. Press the "Send" button
You will see it on the right of the text field.
Step 8. If you want to send a code example (such as an HTML page) to another user on Discord, you can type three backticks (`` `) before and after the text, then hit the Send key
- For example, to format the code "" as a block, type `` `` `on Discord.
- If you want to set a specific language for the code block, type the three backticks, write the language (e.g. css) in the first line, create a new line, then add the rest of the code before inserting the final three backticks.
Advice
-
Discord accepts various languages that you can activate by writing one of the following codes right after the three backticks when creating a block of code:
- markdown
- ruby
- php
- perl
- python
- css
- json
- javascript
- java
- cpp (C ++)
- Creating a block of code can be useful for drawing attention to a piece of text (such as a poem) or for sending multiple lines of code without losing the correct formatting.