mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-04-19 07:26:17 +00:00
Documented Embed limits in docstrings
This commit is contained in:
parent
723584ca19
commit
4ce60b4cac
@ -117,6 +117,7 @@ class Embed:
|
|||||||
title: Optional[:class:`str`]
|
title: Optional[:class:`str`]
|
||||||
The title of the embed.
|
The title of the embed.
|
||||||
This can be set during initialisation.
|
This can be set during initialisation.
|
||||||
|
Can only be up to 256 characters.
|
||||||
type: :class:`str`
|
type: :class:`str`
|
||||||
The type of embed. Usually "rich".
|
The type of embed. Usually "rich".
|
||||||
This can be set during initialisation.
|
This can be set during initialisation.
|
||||||
@ -125,6 +126,7 @@ class Embed:
|
|||||||
description: Optional[:class:`str`]
|
description: Optional[:class:`str`]
|
||||||
The description of the embed.
|
The description of the embed.
|
||||||
This can be set during initialisation.
|
This can be set during initialisation.
|
||||||
|
Can only be up to 4096 characters.
|
||||||
url: Optional[:class:`str`]
|
url: Optional[:class:`str`]
|
||||||
The URL of the embed.
|
The URL of the embed.
|
||||||
This can be set during initialisation.
|
This can be set during initialisation.
|
||||||
@ -335,7 +337,7 @@ class Embed:
|
|||||||
Parameters
|
Parameters
|
||||||
-----------
|
-----------
|
||||||
text: :class:`str`
|
text: :class:`str`
|
||||||
The footer text.
|
The footer text. Can only be up to 2048 characters.
|
||||||
icon_url: :class:`str`
|
icon_url: :class:`str`
|
||||||
The URL of the footer icon. Only HTTP(S) is supported.
|
The URL of the footer icon. Only HTTP(S) is supported.
|
||||||
"""
|
"""
|
||||||
@ -493,7 +495,7 @@ class Embed:
|
|||||||
Parameters
|
Parameters
|
||||||
-----------
|
-----------
|
||||||
name: :class:`str`
|
name: :class:`str`
|
||||||
The name of the author.
|
The name of the author. Can only be up to 256 characters.
|
||||||
url: :class:`str`
|
url: :class:`str`
|
||||||
The URL for the author.
|
The URL for the author.
|
||||||
icon_url: :class:`str`
|
icon_url: :class:`str`
|
||||||
@ -542,14 +544,14 @@ class Embed:
|
|||||||
"""Adds a field to the embed object.
|
"""Adds a field to the embed object.
|
||||||
|
|
||||||
This function returns the class instance to allow for fluent-style
|
This function returns the class instance to allow for fluent-style
|
||||||
chaining.
|
chaining. Can only be up to 25 fields.
|
||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
-----------
|
-----------
|
||||||
name: :class:`str`
|
name: :class:`str`
|
||||||
The name of the field.
|
The name of the field. Can only be up to 256 characters.
|
||||||
value: :class:`str`
|
value: :class:`str`
|
||||||
The value of the field.
|
The value of the field. Can only be up to 1024 characters.
|
||||||
inline: :class:`bool`
|
inline: :class:`bool`
|
||||||
Whether the field should be displayed inline.
|
Whether the field should be displayed inline.
|
||||||
"""
|
"""
|
||||||
@ -571,7 +573,7 @@ class Embed:
|
|||||||
"""Inserts a field before a specified index to the embed.
|
"""Inserts a field before a specified index to the embed.
|
||||||
|
|
||||||
This function returns the class instance to allow for fluent-style
|
This function returns the class instance to allow for fluent-style
|
||||||
chaining.
|
chaining. Can only be up to 25 fields.
|
||||||
|
|
||||||
.. versionadded:: 1.2
|
.. versionadded:: 1.2
|
||||||
|
|
||||||
@ -580,9 +582,9 @@ class Embed:
|
|||||||
index: :class:`int`
|
index: :class:`int`
|
||||||
The index of where to insert the field.
|
The index of where to insert the field.
|
||||||
name: :class:`str`
|
name: :class:`str`
|
||||||
The name of the field.
|
The name of the field. Can only be up to 256 characters.
|
||||||
value: :class:`str`
|
value: :class:`str`
|
||||||
The value of the field.
|
The value of the field. Can only be up to 1024 characters.
|
||||||
inline: :class:`bool`
|
inline: :class:`bool`
|
||||||
Whether the field should be displayed inline.
|
Whether the field should be displayed inline.
|
||||||
"""
|
"""
|
||||||
@ -631,7 +633,7 @@ class Embed:
|
|||||||
def set_field_at(self, index: int, *, name: Any, value: Any, inline: bool = True) -> Self:
|
def set_field_at(self, index: int, *, name: Any, value: Any, inline: bool = True) -> Self:
|
||||||
"""Modifies a field to the embed object.
|
"""Modifies a field to the embed object.
|
||||||
|
|
||||||
The index must point to a valid pre-existing field.
|
The index must point to a valid pre-existing field. Can only be up to 25 fields.
|
||||||
|
|
||||||
This function returns the class instance to allow for fluent-style
|
This function returns the class instance to allow for fluent-style
|
||||||
chaining.
|
chaining.
|
||||||
@ -641,9 +643,9 @@ class Embed:
|
|||||||
index: :class:`int`
|
index: :class:`int`
|
||||||
The index of the field to modify.
|
The index of the field to modify.
|
||||||
name: :class:`str`
|
name: :class:`str`
|
||||||
The name of the field.
|
The name of the field. Can only be up to 256 characters.
|
||||||
value: :class:`str`
|
value: :class:`str`
|
||||||
The value of the field.
|
The value of the field. Can only be up to 1024 characters.
|
||||||
inline: :class:`bool`
|
inline: :class:`bool`
|
||||||
Whether the field should be displayed inline.
|
Whether the field should be displayed inline.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user