-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable way to see Message ID of interaction source and response #2410
Comments
Definitely valid. A little tricky from an API ergonomics perspective--you respond to an interaction by issuing an HTTP response code, so we can't like...respond to your response 😄 We could perhaps allow you to |
Maybe if the response is sent to the |
We're going to support this by making the EDIT: I realized that addressed half the issue. As for getting the ID of the source message, we have some thoughts there about how design changes may impact the relationship between source and responses, so no update on the source message id yet as we figure that out. |
If the |
It should. You can technically mock this behavior today by sending an empty |
So, with some changes to messages and interactions in #2615, this "source message" concept is going away. And, some interaction metadata is sent on the message object that you'd receive in a message create. So, you could:
Since deleting the original source message isn't a thing (they're now all one message), is a GET endpoint still needed, or does this new metadata help? |
Would that mean that the interaction id received with the Also, I still believe the GET endpoint would be necessary, as you will get the message object when using type 5 inherently by using the PATCH endpoint to finish your response, but when responding directly, there's no way to achieve this without a bot. I also assume PATCH would no longer work after the 15 minute expiry period, whereas GET might? I generally think more from a gateway perspective, so this wouldn't really affect me personally, but there might be some use for those only using HTTP. |
I believe Mason is referring to ddc0d13. |
Ah, I missed that commit 🤦. I still believe the rest of points are valid though. |
Any news on this? Will there still be a GET method or will watching for the message in the event stream be the only way to get the message ID? |
Quick hackish workaround: You can use the interaction webhook token as a normal webhook execution with ?wait=true and get the message id from that. |
Update on this: we had a PR that got merged, then reverted due to some failing tests. We'll be adding:
And will document them when they're merged! |
These endpoints are live now |
BREAKING CHANGE: possibly a breaking change due to the fact that the messageID is now strictly typed as a Snowflake or `@me` - Reference: discord/discord-api-docs#2410
This is great news. Will this pave some road for #2251? |
Discord has said multiple times that webhooks replying to messages will never happen. Allowing replies would let webhooks access any message but this behavior only lets them access their own (which they could theoretically access anyway by caching sent messages). |
My implication here is that replies could be possible for replying to own webhook-created messages. I'm aware of one engineer's immediate feedback that this is not going to happen right now. Considering the fact that #2251 is still open, I am hopeful that this is not a "will never happen" situation. |
Closing this since the endpoint is live |
Description
After acknowledging a slash command interaction, there appears to be no way to get the channel message id for the interaction source message (if you decide to show it), or the message you reply with in the initial response.
Why This is Needed
I think it's important to be able to link an interaction to the messages it sends in a channel. An example could be deleting messages related to the command run after X amount of time to clean up the channel, or to link reactions, replies, etc up to the original messages sent.
Alternatives Considered
Additional Details
I know this wouldn't be too useful if your application doesn't have a bot user- but for the ones that do the extra control would be appreciated. It looks like you can hack something together by comparing a message's content (
</slash:12312312312> <args>
) and type against the interactions your app provides, but it would be a lot of extra work for something that could be provided w/ the interaction API.The text was updated successfully, but these errors were encountered: