mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-05-16 18:59:09 +00:00
Fix passing ephemeral and thinking together
This commit is contained in:
parent
3c6281ce33
commit
38e6dc4f27
@ -406,7 +406,7 @@ class InteractionResponse:
|
|||||||
-----------
|
-----------
|
||||||
ephemeral: :class:`bool`
|
ephemeral: :class:`bool`
|
||||||
Indicates whether the deferred message will eventually be ephemeral.
|
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`
|
thinking: :class:`bool`
|
||||||
Indicates whether the deferred type should be :attr:`InteractionResponseType.deferred_channel_message`
|
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.
|
instead of the default :attr:`InteractionResponseType.deferred_message_update` if both are valid.
|
||||||
@ -433,6 +433,8 @@ class InteractionResponse:
|
|||||||
if thinking
|
if thinking
|
||||||
else InteractionResponseType.deferred_message_update.value
|
else InteractionResponseType.deferred_message_update.value
|
||||||
)
|
)
|
||||||
|
if thinking and ephemeral:
|
||||||
|
data = {'flags': 64}
|
||||||
elif parent.type is InteractionType.application_command:
|
elif parent.type is InteractionType.application_command:
|
||||||
defer_type = InteractionResponseType.deferred_channel_message.value
|
defer_type = InteractionResponseType.deferred_channel_message.value
|
||||||
if ephemeral:
|
if ephemeral:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user