The token used for authentication with the Discord API.
The ID of the interaction to defer.
The token of the interaction to defer.
Optional
content: stringOptional content to include in the deferred response. Defaults to 'Processing...'.
A promise that resolves to a boolean indicating whether the defer operation was successful.
Will throw an error if there is a problem deferring the response.
const token = 'your_discord_token_here';
const interactionId = 'your_interaction_id_here';
const interactionToken = 'your_interaction_token_here';
const content = 'Please wait...';
deferResponse(token, interactionId, interactionToken, content)
.then(success => {
if (success) {
console.log('Response deferred successfully.');
} else {
console.log('Failed to defer the response.');
}
})
.catch(error => console.error(`Error: ${error.message}`));
Generated using TypeDoc
Defers the response to a Discord interaction, indicating that a future response will be sent.