mirror of
https://github.com/MelisaDev/melisa.git
synced 2024-11-11 19:07:28 +03:00
update returns docstrings
This commit is contained in:
parent
98ef9a0eb7
commit
fba193890a
2 changed files with 14 additions and 12 deletions
|
@ -300,8 +300,8 @@ class MessageableChannel(Channel):
|
|||
|
||||
Returns
|
||||
-------
|
||||
Union[:class:`~melisa.models.guild.channel.PublicThread`,
|
||||
:class:`~melisa.models.guild.channel.PrivateThread`]
|
||||
Union[:class:`~melisa.models.guild.channel.Channel`,
|
||||
:class:`Any`]
|
||||
The created thread.
|
||||
"""
|
||||
|
||||
|
@ -335,6 +335,8 @@ class MessageableChannel(Channel):
|
|||
---------
|
||||
Flattening messages into a list:
|
||||
.. code-block:: python
|
||||
:linenos:
|
||||
|
||||
messages = [message async for message in channel.history(limit=111)]
|
||||
|
||||
All parameters are optional.
|
||||
|
@ -359,7 +361,7 @@ class MessageableChannel(Channel):
|
|||
|
||||
Returns
|
||||
-------
|
||||
AsyncIterator[:class:`~melisa.Message`]
|
||||
AsyncIterator[:class:`~melisa.models.message.message.Message`]
|
||||
An iterator of messages.
|
||||
"""
|
||||
|
||||
|
@ -412,7 +414,7 @@ class MessageableChannel(Channel):
|
|||
|
||||
Returns
|
||||
-------
|
||||
:class:`~melisa.Message`
|
||||
:class:`~melisa.models.message.message.Message`
|
||||
Message object.
|
||||
"""
|
||||
|
||||
|
@ -434,7 +436,7 @@ class MessageableChannel(Channel):
|
|||
|
||||
Returns
|
||||
-------
|
||||
AsyncIterator[:class:`~melisa.Message`]
|
||||
AsyncIterator[:class:`~melisa.models.message.message.Message`]
|
||||
AsyncIterator of Message objects.
|
||||
"""
|
||||
|
||||
|
|
|
@ -106,11 +106,11 @@ class Message(APIModelBase):
|
|||
|
||||
Attributes
|
||||
----------
|
||||
id: :class:`~melisa.utils.types.Snowflake`
|
||||
id: :class:`~melisa.utils.types.snowflake.Snowflake`
|
||||
Id of the message
|
||||
channel_id: :class:`~melisa.utils.types.Snowflake`
|
||||
channel_id: :class:`~melisa.utils.types.snowflake.Snowflake`
|
||||
Id of the channel the message was sent in
|
||||
guild_id: :class:`~melisa.utils.types.Snowflake`
|
||||
guild_id: :class:`~melisa.utils.types.snowflake.Snowflake`
|
||||
Id of the guild the message was sent in
|
||||
author: :class:`typing.Any`
|
||||
The author of this message (not guaranteed to be a valid user, see below)
|
||||
|
@ -118,9 +118,9 @@ class Message(APIModelBase):
|
|||
Member properties for this message's author
|
||||
content: :class:`str`
|
||||
Contents of the message
|
||||
timestamp: :class:`~melisa.utils.Timestamp`
|
||||
timestamp: :class:`~melisa.utils.timestamp.Timestamp`
|
||||
When this message was sent
|
||||
edited_timestamp: :class:`~melisa.utils.Timestamp`
|
||||
edited_timestamp: :class:`~melisa.utils.timestamp.Timestamp`
|
||||
When this message was edited (or null if never)
|
||||
tts: :class:`bool`
|
||||
Whether this was a TTS message
|
||||
|
@ -142,7 +142,7 @@ class Message(APIModelBase):
|
|||
Used for validating a message was sent
|
||||
pinned: :class:`bool`
|
||||
Whether this message is pinned
|
||||
webhook_id: :class:`~melisa.utils.types.Snowflake`
|
||||
webhook_id: :class:`~melisa.utils.types.snowflake.Snowflake`
|
||||
If the message is generated by a webhook, this is the webhook's id
|
||||
type: :class:`int`
|
||||
Type of message
|
||||
|
@ -150,7 +150,7 @@ class Message(APIModelBase):
|
|||
Sent with Rich Presence-related chat embeds
|
||||
application: :class:`typing.Any`
|
||||
Sent with Rich Presence-related chat embeds
|
||||
application_id: :class:`~melisa.Snowflake`
|
||||
application_id: :class:`~melisa.utils.types.snowflake.Snowflake`
|
||||
If the message is an Interaction or application-owned webhook,
|
||||
this is the id of the application
|
||||
message_reference: :class:`typing.Any`
|
||||
|
|
Loading…
Reference in a new issue