Skip to main content

Prerequisites

Before installing discord-interactions, make sure you have Node.js installed:
Minimum Node.js version: 18.4.0 or higher
You can check your Node.js version by running:
node --version

Install the Package

Install the discord-interactions package using your preferred package manager:
npm install discord-interactions

TypeScript Support

The package includes TypeScript definitions out of the box. No additional @types package is needed.
The package exports types from dist/index.d.ts and includes full TypeScript support for all interactions, webhook events, and message components.

Verify Installation

After installation, you can verify the package is working by importing it in your project:
const { InteractionType, InteractionResponseType, verifyKeyMiddleware } = require('discord-interactions');

console.log('discord-interactions installed successfully!');

Next Steps

Quickstart Guide

Build your first Discord webhook handler

API Reference

Explore the complete API documentation

Build docs developers (and LLMs) love