Browse Source

Document NotFound for Interaction original_message methods

pull/7670/head
metro 3 years ago
committed by GitHub
parent
commit
342652c8ad
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      discord/interactions.py

13
discord/interactions.py

@ -255,9 +255,10 @@ class Interaction:
Fetches the original interaction response message associated with the interaction. Fetches the original interaction response message associated with the interaction.
If the interaction response was :meth:`InteractionResponse.send_message` then this would If the interaction response was a newly created message (i.e. through :meth:`InteractionResponse.send_message`
return the message that was sent using that response. Otherwise, this would return or :meth:`InteractionResponse.defer`, where ``thinking`` is ``True``) then this returns the message that was sent
the message that triggered the interaction. using that response. Otherwise, this returns the message that triggered the interaction (i.e.
through a component).
Repeated calls to this will return a cached value. Repeated calls to this will return a cached value.
@ -267,6 +268,8 @@ class Interaction:
Fetching the original response message failed. Fetching the original response message failed.
ClientException ClientException
The channel for the message could not be resolved. The channel for the message could not be resolved.
NotFound
The interaction response message does not exist.
Returns Returns
-------- --------
@ -342,6 +345,8 @@ class Interaction:
------- -------
HTTPException HTTPException
Editing the message failed. Editing the message failed.
NotFound
The interaction response message does not exist.
Forbidden Forbidden
Edited a message that is not yours. Edited a message that is not yours.
TypeError TypeError
@ -393,6 +398,8 @@ class Interaction:
------- -------
HTTPException HTTPException
Deleting the message failed. Deleting the message failed.
NotFound
The interaction response message does not exist or has already been deleted.
Forbidden Forbidden
Deleted a message that is not yours. Deleted a message that is not yours.
""" """

Loading…
Cancel
Save