Add support for setting interaction responses

This commit is contained in:
Rapptz
2021-04-30 19:32:13 -04:00
parent 85758a75b3
commit 3b83f60b35
3 changed files with 268 additions and 7 deletions

View File

@ -1188,17 +1188,30 @@ of :class:`enum.Enum`.
.. attribute:: pong
Pongs the interaction when given a ping.
See also :meth:`InteractionResponse.pong`
.. attribute:: channel_message
Respond to a slash command with a message.
Respond to the interaction with a message.
See also :meth:`InteractionResponse.send_message`
.. attribute:: deferred_channel_message
Responds to a slash command with a message at a later time.
Responds to the interaction with a message at a later time.
See also :meth:`InteractionResponse.defer`
.. attribute:: deferred_message_update
Acknowledges the component interaction with a promise that
the message will update later (though there is no need to actually update the message).
See also :meth:`InteractionResponse.defer`
.. attribute:: message_update
Responds to the interaction by editing the message.
See also :meth:`InteractionResponse.edit_message`
.. class:: ComponentType
Represents the component type of a component.
@ -2951,6 +2964,14 @@ Interaction
.. autoclass:: Interaction()
:members:
InteractionResponse
~~~~~~~~~~~~~~~~~~~~
.. attributetable:: InteractionResponse
.. autoclass:: InteractionResponse()
:members:
Member
~~~~~~