diff options
| author | Rapptz <[email protected]> | 2021-03-28 11:07:51 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-04-06 01:11:36 -0400 |
| commit | 8cece19b2220bd6b7f61438219a0b88d0768a079 (patch) | |
| tree | d82c331964790add2a4f11f7fc0342074a2f4521 /docs | |
| parent | Add support for setting application_id (diff) | |
| download | discord.py-8cece19b2220bd6b7f61438219a0b88d0768a079.tar.xz discord.py-8cece19b2220bd6b7f61438219a0b88d0768a079.zip | |
Add on_interaction event and Interaction class.
This is the first pass at the functionality. It's currently a bit
incomplete.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/api.rst | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/api.rst b/docs/api.rst index b328ab22..859f1e25 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -585,6 +585,17 @@ to handle it, which defaults to print a traceback and ignoring the exception. :param payload: The raw event payload data. :type payload: :class:`RawReactionClearEmojiEvent` +.. function:: on_interaction(interaction) + + Called when an interaction happened. + + This currently happens due to slash command invocations. + + .. versionadded:: 2.0 + + :param interaction: The interaction data. + :type interaction: :class:`Interaction` + .. function:: on_private_channel_delete(channel) on_private_channel_create(channel) @@ -1089,6 +1100,20 @@ of :class:`enum.Enum`. .. versionadded:: 1.5 +.. class:: InteractionType + + Specifies the type of :class:`Interaction`. + + .. versionadded:: 2.0 + + .. attribute:: ping + + Represents Discord pinging to see if the interaction response server is alive. + + .. attribute:: application_command + + Represents a slash command interaction. + .. class:: HypeSquadHouse Specifies the HypeSquad house a user belongs to. @@ -2699,6 +2724,14 @@ Integration .. autoclass:: IntegrationAccount() :members: +Interaction +~~~~~~~~~~~~ + +.. attributetable:: Interaction + +.. autoclass:: Interaction() + :members: + Member ~~~~~~ |