From 342652c8ad053ea0063b477b8716ac2aac48e126 Mon Sep 17 00:00:00 2001 From: metro <50273080+m-etroo@users.noreply.github.com> Date: Sat, 12 Mar 2022 20:49:06 -0500 Subject: [PATCH] Document NotFound for Interaction original_message methods --- discord/interactions.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/discord/interactions.py b/discord/interactions.py index 90d1a0128..18828d658 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -255,9 +255,10 @@ class Interaction: Fetches the original interaction response message associated with the interaction. - If the interaction response was :meth:`InteractionResponse.send_message` then this would - return the message that was sent using that response. Otherwise, this would return - the message that triggered the interaction. + If the interaction response was a newly created message (i.e. through :meth:`InteractionResponse.send_message` + or :meth:`InteractionResponse.defer`, where ``thinking`` is ``True``) then this returns the message that was sent + 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. @@ -267,6 +268,8 @@ class Interaction: Fetching the original response message failed. ClientException The channel for the message could not be resolved. + NotFound + The interaction response message does not exist. Returns -------- @@ -342,6 +345,8 @@ class Interaction: ------- HTTPException Editing the message failed. + NotFound + The interaction response message does not exist. Forbidden Edited a message that is not yours. TypeError @@ -393,6 +398,8 @@ class Interaction: ------- HTTPException Deleting the message failed. + NotFound + The interaction response message does not exist or has already been deleted. Forbidden Deleted a message that is not yours. """