I have the following case. I have two serverless instances. With a command, the first instance creates an interaction as a response to a application command. Then the user receives receives a link which he should click on.
The link triggers the second instance and has the "webhook id" and the "interaction token" of the created interaction as parameter.
Now I'm trying to update the first interaction instead of sending a followup message.
Unfortunately execute_webhook does not have a parameter for "response_type". Using execute_webhook works without problems but does create a new message
#use execute_webhook to update previous interaction
1 messages · Page 1 of 1 (latest)
I believe edit_webhook_message is what you are looking for
@grizzled haven 🙂
Thanks! Weird that it needs a message id
@grizzled haven is the second interaction a button being pressed in the message?
Because if so, you can just respond to the interaction with the response type being MESSAGE_UPDATE and that will edit the message
hmmm, no. Theoretically there is no second interaction because it's just a rest call to my server which ideally triggers a function with MESSAGE_UPDATE
Maybe I need to figure out how to get the interaction id and send that
instead of the webhook id
Just to make sure I'm getting this right:
- Message is sent with a link to an external service
- User goes through that link and does something
- Initial message is updated
That correct?
jep, more specifically - oauth
It's weird because partial interactions have no id parameter which matches to the interaction id of "create_interaction_response" https://docs.hikari-py.dev/en/latest/reference/hikari/interactions/base_interactions/#hikari.interactions.base_interactions.PartialInteraction
I would recommend sending along state as being the ID of the message to update and then doing so with a simple edit_message call
They all have an ID