aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/content/resources
diff options
context:
space:
mode:
authorGravatar Krypton <[email protected]>2022-04-01 18:15:19 +0200
committerGravatar GitHub <[email protected]>2022-04-01 16:15:19 +0000
commit1005229e825a5f2449168bcae2b85667c5799265 (patch)
treec75a3221da99dbdb2147b67bf7b018cde359ba7c /pydis_site/apps/content/resources
parentMerge pull request #706 from python-discord/remove-resource-suggestion-template (diff)
Added Discord embed limits guide (#690)
Co-authored-by: Krypton <[email protected]> Co-authored-by: Krypton <[email protected]> Co-authored-by: Xithrius <[email protected]>
Diffstat (limited to 'pydis_site/apps/content/resources')
-rw-r--r--pydis_site/apps/content/resources/guides/python-guides/discord-embed-limits.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/pydis_site/apps/content/resources/guides/python-guides/discord-embed-limits.md b/pydis_site/apps/content/resources/guides/python-guides/discord-embed-limits.md
new file mode 100644
index 00000000..ca97462b
--- /dev/null
+++ b/pydis_site/apps/content/resources/guides/python-guides/discord-embed-limits.md
@@ -0,0 +1,21 @@
+---
+title: Discord Embed Limits
+description: A guide that shows the limits of embeds in Discord and how to avoid them.
+---
+
+If you plan on using embed responses for your bot you should know the limits of the embeds on Discord or you will get `Invalid Form Body` errors:
+
+- Embed **title** is limited to **256 characters**
+- Embed **description** is limited to **4096 characters**
+- An embed can contain a maximum of **25 fields**
+- A **field name/title** is limited to **256 character** and the **value of the field** is limited to **1024 characters**
+- Embed **footer** is limited to **2048 characters**
+- Embed **author name** is limited to **256 characters**
+- The **total of characters** allowed in an embed is **6000**
+
+Now if you need to get over this limit (for example for a help command), you would need to use pagination.
+There are several ways to do that:
+
+- A library called **[disputils](https://pypi.org/project/disputils)**
+- An experimental library made by the discord.py developer called **[discord-ext-menus](https://github.com/Rapptz/discord-ext-menus)**
+- Make your own setup using **[wait_for()](https://discordpy.readthedocs.io/en/stable/ext/commands/api.html#discord.ext.commands.Bot.wait_for)** and wait for a reaction to be added