Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 115 additions & 21 deletions docs/getting-started/more-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ method, you can set a small footer that holds a message. This has `text` and `ic
- Author - With the [`set_author`](https://docs.pycord.dev/en/master/api.html#discord.Embed.set_author)
method, you can set an author for the embed. This is a small text field at the top of the embed. This
includes `name`, `url` and `icon_url` kwargs.
- Thumbnail - With the [`set_thumbnial`](https://docs.pycord.dev/en/master/api.html#discord.Embed.set_thumbnail)
- Thumbnail - With the [`set_thumbnail`](https://docs.pycord.dev/en/master/api.html#discord.Embed.set_thumbnail)
method, you can set a small image to reside at the top-right of the embed. This has a single `url` kwarg.
- Image - With the [`set_image`](https://docs.pycord.dev/en/master/api.html#discord.Embed.set_image)
method, you can set an image to sit at the bottom of an embed. This has a single `url` kwarg.
Expand All @@ -227,7 +227,12 @@ There are a lot more methods and attributes you can use to configure embeds. Her

### Markdown
Markdown is a type of markup language that's limited in terms of formatting yet simple. Discord allows
for a watered-down version of markdown to be in their messages. This includes:
for a watered-down version of markdown to be in their messages.

#### Text Markdown

Text formatting can be used in messages and in most embed parts,
as explained in the dedicated section below.

<table>
<tr>
Expand All @@ -250,33 +255,122 @@ for a watered-down version of markdown to be in their messages. This includes:
</tr>
</table>

Sadly, Discord does not support other types, such as hyperlinks. The only supported places for hyperlinks are
in embeds and messages sent through webhooks.

Adding markdown to your embeds or messages will give your bot the sparkle it needs.
#### Code Markdown

Here is an example for a hyperlink in embeds.
To create a single-line code block without syntax highlight, wrap the text between single backticks.
This code block will only add a dark background to the text.

```
[Click here!](https://pycord.dev/)
\`print("Hello world!")\`
```
Inside the embed, the example above will look like this: [`Click here!`](https://pycord.dev/)

:::caution

Some embed fields, such as the footer, do not support markdown *at all*, including bold and italics.

:::
To create a multi-line code block without syntax highlight, wrap the text between triple backticks
on first and last line. This type of code block will encase the code inside a box.

#### Code Markdown
```
\`\`\`
message = "Hello world!"
print(message)
\`\`\`
```

For code markdown, you can choose between `Code Text` and `Code Blocks`.
To create a multi-line block with syntax highlight, add the name of the language you are using right after
the triple backticks on the first line. For example, for Python you can write either "python" or "py".

- \`Code Text\`
- \`\`\`
Code Blocks
```
\`\`\`python
message = "Hello world!"
print(message)
\`\`\`
```

If you want to use syntax highlight for a single line of code, you still have to format it
like a multi-line block but the code must be on a separate line than the triple backticks.

#### Quote Markdown

To create a single-line quote block, start the line with `>` followed by a space.

```
> This is a single-line quote.
```

Code Blocks support different programming languages, such as Python.
To create a multi-line quote block, write `>>>` followed by a space. All text
from that point onwards will be included in that quote block.

If you start your Code Block with <code>```python</code>, you can send readable Python code to Discord.
```
>>> This is a
multi-line quote.
```

#### Spoiler Markdown

To hide a spoiler, encase the text between double pipes. The users
will have to click on it before being able to see the text contained in it.

```
||spoiler||
```

#### Link Markdown

Link formatting only works in embeds and messages sent through webhooks,
by using the following syntax:

```
[Pycord](https://pycord.dev/)
```

Inside the supported elements that have just been mentioned,
the example above will look like this: [`Pycord`](https://pycord.dev/)

Outside of them, the link will still be clickable but the formatting will be ignored,
therefore the example above will look similarly to this: `[Pycord](https://pycord.dev/)`

#### Embed Markdown

Adding markdown to your embeds or messages will give your bot the sparkle it needs,
however, markdown is limited inside embeds. Use the following table as a reference
and keep in mind that embed title and filed names will always show in **bold**.

<table>
<thead>
<tr>
<th>Part</th>
<th>Text</th>
<th>Link</th>
</tr>
</thead>
<tbody>
<tr>
<td>Embed Author</td>
<td>No</td>
<td>No</td>
</tr>
<tr>
<td>Embed Title</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>Embed Description</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Field Name</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>Field Value</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Embed Footer</td>
<td>No</td>
<td>No</td>
</tr>
</tbody>
</table>