From 1f8687505febb3241b0d1d922a78038b9b336735 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Mon, 7 Mar 2022 17:53:01 -0500 Subject: [PATCH] Fix InteractionResponse.edit_message not working with modal submits --- discord/interactions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/interactions.py b/discord/interactions.py index 25f6f5234..c5ef87868 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -610,7 +610,7 @@ class InteractionResponse: """|coro| Responds to this interaction by editing the original message of - a component interaction. + a component or modal interaction. Parameters ----------- @@ -652,7 +652,7 @@ class InteractionResponse: msg = parent.message state = parent._state message_id = msg.id if msg else None - if parent.type is not InteractionType.component: + if parent.type not in (InteractionType.component, InteractionType.modal_submit): return if view is not MISSING and message_id is not None: