• Sends a response to a Discord interaction.

    Parameters

    • token: string

      The bot's token used for authentication with the Discord API.

    • interactionId: string

      The ID of the interaction to respond to.

    • interactionToken: string

      The token specific to the interaction.

    • body: any

      The content of the response message.

    Returns Promise<boolean>

    A promise that resolves to true if the response is sent successfully.

    Throws

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

    Example

    const token = 'your_discord_token_here'
    const interactionId = 'your_interaction_id_here'
    const interactionToken = 'your_interaction_token_here'
    const body = {
    type: 4,
    data: {
    content: 'Hello, world!',
    },
    }
    const result = await interactionMessage(token, interactionId, interactionToken, body)
    console.log(result); // true

Generated using TypeDoc