mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-23 03:16:48 +00:00
Fix documentation build failure from previous rename
This commit is contained in:
parent
dd40ff1d57
commit
7e3b08871b
@ -437,7 +437,7 @@ How can I disable all items on timeout?
|
|||||||
|
|
||||||
This requires three steps.
|
This requires three steps.
|
||||||
|
|
||||||
1. Attach a message to the :class:`~discord.ui.View` using either the return type of :meth:`~abc.Messageable.send` or retrieving it via :meth:`Interaction.original_message`.
|
1. Attach a message to the :class:`~discord.ui.View` using either the return type of :meth:`~abc.Messageable.send` or retrieving it via :meth:`Interaction.original_response`.
|
||||||
2. Inside :meth:`~ui.View.on_timeout`, loop over all items inside the view and mark them disabled.
|
2. Inside :meth:`~ui.View.on_timeout`, loop over all items inside the view and mark them disabled.
|
||||||
3. Edit the message we retrieved in step 1 with the newly modified view.
|
3. Edit the message we retrieved in step 1 with the newly modified view.
|
||||||
|
|
||||||
@ -465,7 +465,7 @@ Putting it all together, we can do this in a text command:
|
|||||||
# Step 1
|
# Step 1
|
||||||
view.message = await ctx.send('Press me!', view=view)
|
view.message = await ctx.send('Press me!', view=view)
|
||||||
|
|
||||||
Application commands do not return a message when you respond with :meth:`InteractionResponse.send_message`, therefore in order to reliably do this we should retrieve the message using :meth:`Interaction.original_message`.
|
Application commands do not return a message when you respond with :meth:`InteractionResponse.send_message`, therefore in order to reliably do this we should retrieve the message using :meth:`Interaction.original_response`.
|
||||||
|
|
||||||
Putting it all together, using the previous view definition:
|
Putting it all together, using the previous view definition:
|
||||||
|
|
||||||
@ -478,7 +478,7 @@ Putting it all together, using the previous view definition:
|
|||||||
await interaction.response.send_message('Press me!', view=view)
|
await interaction.response.send_message('Press me!', view=view)
|
||||||
|
|
||||||
# Step 1
|
# Step 1
|
||||||
view.message = await interaction.original_message()
|
view.message = await interaction.original_response()
|
||||||
|
|
||||||
|
|
||||||
Application Commands
|
Application Commands
|
||||||
|
Loading…
x
Reference in New Issue
Block a user