Skip to content

Commit b16c2fc

Browse files
authored
Updated docs to 1.7.5.4
1 parent 3672c12 commit b16c2fc

File tree

4 files changed

+24
-14
lines changed

4 files changed

+24
-14
lines changed

docs/additions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ utils
312312

313313
Timestamps will display the given timestamp in the user's timezone and locale.
314314

315-
:param timestamp: Union[`datetime.datetime <https://docs.python.org/3/library/datetime.html>`_, :class:`int`]
315+
:param timestamp: Union[`datetime.datetime <https://docs.python.org/3/library/datetime.html#datetime.datetime>`_, :class:`int`]
316316
The timestamp; A :class:`datetime.datetime` object or an already completed timestamp.
317317

318318
:param style: Optional[Union[:class:`TimestampStyle`, :class:`str`]]

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
author = 'Mathieu Corsham aka. mccoder.py'
2727

2828
# The full version, including alpha/beta/rc tags
29-
release = '1.7.5.2'
29+
release = '1.7.5.4'
3030

3131

3232
# -- General configuration ---------------------------------------------------

docs/index.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,12 @@ ________________________________________
207207
coro
208208
~~~~
209209

210-
A coro (coroutine) is a method that needs to be awaited means ``await method``.
210+
A `coroutine <https://docs.python.org/3/library/asyncio-task.html#coroutine>`_ is a function that must be invoked with ``await`` or ``yield from``.
211+
When Python encounters an ``await`` it stops the function’s execution at that point and works on other things until it comes back to that point and finishes off its work.
212+
This allows for your program to be doing multiple things at the same time without using threads or complicated multiprocessing.
213+
214+
**If you forget to await a coroutine then the coroutine will not run. Never forget to await a coroutine.**
211215

212-
See the official `Python-Docs <https://docs.python.org/3/c-api/coro.html>`_.
213216

214217
.. toctree::
215218
:maxdepth: 3

docs/interaction.rst

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,11 @@ Interaction
6060
.. attribute:: message
6161

6262
The message the component was attached to.
63-
This will be equal to ``None`` if the :attr:`component_type` is ``None`` or the message the component is attached to is ``ephemeral``.
63+
This will be :class:`EphemeralMessage` if the :attr:`component_type` is not ``None`` or the message the component is attached to is ``ephemeral``.
6464

6565
.. note::
6666
In this version, this parameter should always be an object of type :class:`discord.Message`
67-
(or ``None`` if the message is ephemeral) because it only gets initiated when the interaction_type is higher than 2.
67+
(or :class:`EphemeralMessage` if the message is ephemeral) because it only gets initiated when the interaction_type is higher than 2.
6868

6969
.. attribute:: channel
7070

@@ -85,18 +85,25 @@ Interaction
8585
.. note::
8686
If this is passed in an ``[on_][raw_]button_click`` or ``[on_][raw_]selection_select`` Event there would be a second parameter that includes this attribute.
8787

88-
.. method:: defer(response_type: any([InteractionCallbackType.deferred_msg_with_source, InteractionCallbackType.deferred_update_msg, int]) = InteractionCallbackType.deferred_update_msg, hidden=False)
88+
.. attribute:: created_at
89+
90+
Returns the Interaction’s creation time in UTC.
91+
92+
**Type**
93+
`datetime.datetime <https://docs.python.org/3/library/datetime.html#datetime.datetime>`_
94+
95+
.. method:: defer(response_type: typing.Literal[5, 6] = InteractionCallbackType.deferred_update_msg, hidden: bool = False)
8996

9097
`|coro| <./index.html#coro>`_
9198

9299
'Defers' the response.
93100

94-
If :attr:`response_type` is `InteractionCallbackType.deferred_msg_with_source` it shows a loading state to the user.
101+
If :attr:`response_type` is :class:`InteractionCallbackType.deferred_msg_with_source` it shows a loading state to the user.
95102

96-
:param response_type: any([InteractionCallbackType.deferred_msg_with_source, InteractionCallbackType.deferred_update_msg, int])
103+
:param response_type: Optional[typing.Literal[5, 6]]
97104
The type to response with, aiter :class:`InteractionCallbackType.deferred_msg_with_source` or :class:`InteractionCallbackType.deferred_update_msg` (e.g. 5 or 6)
98105

99-
:param hidden: Optional[bool] = False
106+
:param hidden: Optional[bool]
100107
Whether to defer ephemerally(only the :attr:`author` of the interaction can see the message)
101108

102109
.. note::
@@ -110,8 +117,8 @@ Interaction
110117

111118
.. note::
112119
A Token will be Valid for 15 Minutes so you could edit the original :attr:`message` with :meth:`edit`, :meth:`respond` or doing anything other with this interaction for 15 minutes.
113-
after that time you have to edit the original message with the Methode :meth:`edit` of the :attr:`message` and sending new messages with the :meth:`send` Methode of :attr:`channel`
114-
(you could not do this hidden as it isn't an respond anymore)
120+
after that time you have to edit the original message with the Methode ``edit`` of the :attr:`message` and sending new messages with the ``send`` Methode of :attr:`channel`
121+
(you could not do this hidden as it isn't an interaction-response anymore)
115122

116123
.. method:: edit(**fields)
117124

@@ -120,7 +127,7 @@ Interaction
120127
Edit the :class:`Message` the component is attached to, if the interaction is not deferred it will defer automatic.
121128

122129
.. note::
123-
If you have not yet defered or defered with type :class:`InteractionCallbackType.deferred_update_msg`, edit the message to which the component is attached, otherwise edit the callback message.
130+
If you have not yet deferred or deferred with type :class:`InteractionCallbackType.deferred_update_msg`, edit the message to which the component is attached, otherwise edit the callback message.
124131

125132
:param \**fields: The fields of the original message to replace. You could pass the same Parameters as using :meth:`discord.Message.edit`
126133

@@ -139,7 +146,7 @@ Interaction
139146
If you send an ``hidden`` (ephemeral)-respond, discord don't returns any data like an message you could edit,
140147
**but** you could receive Interactions when the Author interact with an component in the message.
141148

142-
:return: Union[:class:`discord.Message`, :class:`discord.EphemeralMessage`]
149+
:return: Union[:class:`discord.Message`, :class:`EphemeralMessage`]
143150

144151
________________________________________
145152

0 commit comments

Comments
 (0)