update returns docstrings

This commit is contained in:
grey-cat-1908 2022-04-07 22:41:46 +03:00
parent 98ef9a0eb7
commit fba193890a
2 changed files with 14 additions and 12 deletions

View file

@ -300,8 +300,8 @@ class MessageableChannel(Channel):
Returns Returns
------- -------
Union[:class:`~melisa.models.guild.channel.PublicThread`, Union[:class:`~melisa.models.guild.channel.Channel`,
:class:`~melisa.models.guild.channel.PrivateThread`] :class:`Any`]
The created thread. The created thread.
""" """
@ -335,6 +335,8 @@ class MessageableChannel(Channel):
--------- ---------
Flattening messages into a list: Flattening messages into a list:
.. code-block:: python .. code-block:: python
:linenos:
messages = [message async for message in channel.history(limit=111)] messages = [message async for message in channel.history(limit=111)]
All parameters are optional. All parameters are optional.
@ -359,7 +361,7 @@ class MessageableChannel(Channel):
Returns Returns
------- -------
AsyncIterator[:class:`~melisa.Message`] AsyncIterator[:class:`~melisa.models.message.message.Message`]
An iterator of messages. An iterator of messages.
""" """
@ -412,7 +414,7 @@ class MessageableChannel(Channel):
Returns Returns
------- -------
:class:`~melisa.Message` :class:`~melisa.models.message.message.Message`
Message object. Message object.
""" """
@ -434,7 +436,7 @@ class MessageableChannel(Channel):
Returns Returns
------- -------
AsyncIterator[:class:`~melisa.Message`] AsyncIterator[:class:`~melisa.models.message.message.Message`]
AsyncIterator of Message objects. AsyncIterator of Message objects.
""" """

View file

@ -106,11 +106,11 @@ class Message(APIModelBase):
Attributes Attributes
---------- ----------
id: :class:`~melisa.utils.types.Snowflake` id: :class:`~melisa.utils.types.snowflake.Snowflake`
Id of the message 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 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 Id of the guild the message was sent in
author: :class:`typing.Any` author: :class:`typing.Any`
The author of this message (not guaranteed to be a valid user, see below) 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 Member properties for this message's author
content: :class:`str` content: :class:`str`
Contents of the message Contents of the message
timestamp: :class:`~melisa.utils.Timestamp` timestamp: :class:`~melisa.utils.timestamp.Timestamp`
When this message was sent 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) When this message was edited (or null if never)
tts: :class:`bool` tts: :class:`bool`
Whether this was a TTS message Whether this was a TTS message
@ -142,7 +142,7 @@ class Message(APIModelBase):
Used for validating a message was sent Used for validating a message was sent
pinned: :class:`bool` pinned: :class:`bool`
Whether this message is pinned 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 If the message is generated by a webhook, this is the webhook's id
type: :class:`int` type: :class:`int`
Type of message Type of message
@ -150,7 +150,7 @@ class Message(APIModelBase):
Sent with Rich Presence-related chat embeds Sent with Rich Presence-related chat embeds
application: :class:`typing.Any` application: :class:`typing.Any`
Sent with Rich Presence-related chat embeds 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, If the message is an Interaction or application-owned webhook,
this is the id of the application this is the id of the application
message_reference: :class:`typing.Any` message_reference: :class:`typing.Any`