Creating an interaction response should return the message data #4425
-
When responding to an interaction with This means if you want to later reference the sent message, such as to to add reactions, store the message ID etc. it will require an extra API call to In a Discord API wrapper, it would help to have the send method able to return a Message object (just like it works for channel messages and webhooks). Having the library make an extra API call for the user after sending the response is not a practical solution. If the data is available, there should be no reason not to include it in the callback response. If necessary, there could instead be a |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
What's your use case here? |
Beta Was this translation helpful? Give feedback.
-
Another important use case: In API v10, existing attachments must be specified when editing a message with new attachments. Any attachments not specified will be removed and replaced with the specified list. What this means is, you can no longer easily append files to a message without having a list of the existing attachments in the message. Therefore, if the message attachments are not returned in the content of the Interaction response, appending files to an interaction message requires two additional API calls instead of just one. |
Beta Was this translation helpful? Give feedback.
-
this has been added! Use |
Beta Was this translation helpful? Give feedback.
this has been added! Use
?with_response=true
to get the response details back. #7106https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response