From 38e6dc4f27d70ce22d088fbe605c2da0a31f228d Mon Sep 17 00:00:00 2001 From: Maya <17090652+XuaTheGrate@users.noreply.github.com> Date: Tue, 22 Feb 2022 00:37:59 +1300 Subject: [PATCH] Fix passing ephemeral and thinking together --- discord/interactions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/discord/interactions.py b/discord/interactions.py index f266bdf81..809b35198 100644 --- a/discord/interactions.py +++ b/discord/interactions.py @@ -406,7 +406,7 @@ class InteractionResponse: ----------- ephemeral: :class:`bool` Indicates whether the deferred message will eventually be ephemeral. - This only applies for interactions of type :attr:`InteractionType.application_command`. + This only applies to :attr:`InteractionType.application_command` interactions, or if ``thinking`` is ``True``. thinking: :class:`bool` Indicates whether the deferred type should be :attr:`InteractionResponseType.deferred_channel_message` instead of the default :attr:`InteractionResponseType.deferred_message_update` if both are valid. @@ -433,6 +433,8 @@ class InteractionResponse: if thinking else InteractionResponseType.deferred_message_update.value ) + if thinking and ephemeral: + data = {'flags': 64} elif parent.type is InteractionType.application_command: defer_type = InteractionResponseType.deferred_channel_message.value if ephemeral: