Interaction

The following classes are not intended to be manually instantiated, since they are automatically used to parse the received JSON contents.

Interaction

class discord_interactions.Interaction(**kwargs)

This represents the base interaction type that gets invoked for Slash Commands and future interaction types.

classmethod from_json(data: Union[dict, str])Interaction

Creates an instance of this class from the JSON data that is received on a Discord interaction.

https://discord.com/developers/docs/interactions/slash-commands#interaction

Parameters

data – Received JSON

Returns

Instance of Interaction

InteractionType

class discord_interactions.InteractionType(value)

An enumeration.

APPLICATION_COMMAND = 2
MESSAGE_COMPONENT = 3
PING = 1

ApplicationCommandInteractionData

class discord_interactions.ApplicationCommandInteractionData(**kwargs)

ApplicationCommandInteractionDataOption

class discord_interactions.ApplicationCommandInteractionDataOption(**kwargs)