miMini Interaction
v0.4.18@theminesastudios/mini-interaction

mini-interaction

Type-safe, modular Discord HTTP bot framework. Webhook-first, edge-ready, zero unnecessary gateways.

$npm install @theminesastudios/mini-interaction
Read the docs
Features

Modular Routers

Discrete routers for commands, components, and modals - compose what you need, nothing more.

Fluent Message Builders

Chainable builders for embeds, components, and rich message payloads with full type inference.

OAuth2 Handlers

Built-in OAuth2 token management and verification flows for Discord's API.

Edge-Native

Built on @vercel/functions and discord-api-types. Deploy to serverless or Node with zero config.

Fully Type-Safe

End-to-end TypeScript types from gateway to handler. Catch payload mismatches at compile time.

Webhook-First

Respond via webhooks by default. No persistent gateway connection needed for most interactions.

Quick start
server.ts
import { createApp } from "@theminesastudios/mini-interaction";
import { pingCommand } from "./commands/ping";
import { verifyRouter } from "./routers/verify";

const app = createApp({ publicKey: process.env.DISCORD_PUBLIC_KEY });

app.use(pingCommand);
app.use(verifyRouter);

export const POST = app.handle();
// -> Deploy to Vercel as a serverless function.
Architecture
ROUTER

Commands

Slash commands and context menus with typed options, autocomplete, and subcommand grouping.

ROUTER

Components

Buttons, select menus, and modal submissions with type-safe custom ID routing and state.

ROUTER

Modals

Modal submit handlers with validated fields, structured responses, and error recovery.

MIT · The Minesastudios · mini-interaction v0.4.18