#use execute_webhook to update previous interaction

1 messages · Page 1 of 1 (latest)

grizzled haven
#

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

https://docs.hikari-py.dev/en/latest/reference/hikari/impl/rest/#hikari.impl.rest.RESTClientImpl.execute_webhook

eternal scarab
#

I believe edit_webhook_message is what you are looking for

#

@grizzled haven 🙂

grizzled haven
eternal scarab
#

@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

grizzled haven
#

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

eternal scarab
#

Just to make sure I'm getting this right:

  1. Message is sent with a link to an external service
  2. User goes through that link and does something
  3. Initial message is updated
#

That correct?

grizzled haven
#

jep, more specifically - oauth

eternal scarab
#

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

grizzled haven
#

okay will try!

#

thx!