grom/interaction
Types and functions for working with Discord interactions — slash commands, component callbacks, modals, and more.
Types
Represents a Discord interaction. This is the base type sent whenever a user triggers an interaction.
The data payload of an interaction. The content varies based on the interaction type.
An individual option passed to a slash command. Contains the name, type, and value of the option as provided by the user.
Data from a message component interaction, such as a button click or select menu choice.
Functions
Send a reply to an interaction. Must be called within 3 seconds, otherwise use defer_reply.
Acknowledge an interaction with a deferred response, showing a loading state. Follow up with edit_original_response.
Edit the original response to an interaction. Used after a deferred reply to send the actual content.
Create a followup message to an interaction with fine-grained control over content, embeds, and visibility. This is the long function definition that motivated the improved sidebar — it should never be word-wrapped mid-identifier.
Respond to an autocomplete interaction with a list of choices to show to the user.
Retrieve the original response message for an interaction using the application ID and token.