Add on_interaction event and Interaction class.
This is the first pass at the functionality. It's currently a bit incomplete.
This commit is contained in:
		
							
								
								
									
										33
									
								
								docs/api.rst
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								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
 | 
			
		||||
~~~~~~
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user