• Updates a previous response to a Discord interaction.

    Parameters

    • token: string

      The token used for authentication with the Discord API.

    • applicationId: string

      The application ID associated with the interaction.

    • interactionToken: string

      The token of the interaction to update.

    • data: object

      The updated data to send as the response.

    Returns Promise<boolean>

    A promise that resolves to true when the response is successfully updated.

    Throws

    Will throw an error if there is a problem updating the response.

    Example

    const token = 'your_discord_token_here';
    const applicationId = 'your_application_id_here';
    const interactionToken = 'your_interaction_token_here';
    const data = {
    content: 'Updated response!',
    };

    const run = async () => {
    try {
    const success = await updateResponse(token, applicationId, interactionToken, data);
    if (success) {
    console.log('Response updated successfully.');
    } else {
    console.log('Failed to update the response.');
    }
    } catch (error) {
    console.error(`Error: ${error.message}`);
    }
    }

    run();

Generated using TypeDoc