The token used for authentication with the Discord API.
The application ID associated with the interaction.
The token of the interaction to update.
The updated data to send as the response.
A promise that resolves to true when the response is successfully updated.
Will throw an error if there is a problem updating the response.
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
Updates a previous response to a Discord interaction.