Skip to content

HTTP Handler

İbrahim edited this page Dec 15, 2025 · 3 revisions

For a Vercel project, create api/interactions.ts and expose the handler returned by createNodeHandler() or createFetchHandler().

// api/interactions.ts
import { MiniInteraction } from "@minesa-org/mini-interaction";

export const mini = new MiniInteraction({
	applicationId: process.env.DISCORD_APPLICATION_ID!,
	publicKey: process.env.DISCORD_APP_PUBLIC_KEY!,
});

export default mini.createNodeHandler(); // For Vercel

That is enough for Discord to ping your endpoint and dispatch incoming commands to the right handler.

Clone this wiki locally