#Sending a modal through buttons

1 messages · Page 1 of 1 (latest)

quick totem
#

Hello,

I have a question...
Is there a way to display a modal by clicking on a button?
With "await interaction.response.send_modal(modal) in button call back, it doesn't work, because the request was already responded. But edit_message or edit_original_message don't give the possibility to send modals.
Does anyone have an idea?

formal hatch
#

Interaction.response.send_modal is the right one for it

quick totem
#

Yeah... i know... but what should i use when i have responded before?
You can not respond two times

severe haven
#

If you want to send some message use interaction.channel.send

#

Or to edit msg = interaction.original_response()

#

And then msg.edit

quick totem
#

Ok. I will try that. Thank you

severe haven
#

Btw

quick totem
#

👍

formal hatch
#

Is it working?

quick totem
#

Yeeeees :)

#

Thank you ;)
Now the modal is opening via button klick and the buttons are disabled after klicking. Works like it should.
🙏

formal hatch
#

.close

lost torrentBOT
#

Done with your help thread?

Please close your own help thread by using </close:1009144375709814897> with @night quiver.

Backup bot: </solved:1109625445990793246> (or .solved) with @lost torrent.