Skip to main content

Arcscord

A TypeScript-first framework for building Discord bots — typed commands, components, and result-style error handling on top of discord.js.

arcscord npm versionarcscord monthly downloadsGitHub stars

A bot in a few lines

Create a client, declare a typed slash command, and register it.

index.ts
import { ArcClient, createCommand } from "arcscord";

const client = new ArcClient(process.env.DISCORD_TOKEN!, {
intents: ["Guilds"],
applicationId: process.env.APPLICATION_ID!,
});

const ping = createCommand({
slash: { name: "ping", description: "Check if the bot is available" },
run: ctx => ctx.reply("Pong!"),
});

await client.login();
await client.loadCommands([ping]);

Installation

Requires Node.js 24.11.0 or newer, or Bun 1.3.0 or newer, and TypeScript 5.4 or newer.

pnpm add arcscord discord.js

Packages

Install only what you need. Each package ships its own types.

arcscord

Core Discord bot framework: client, commands, components, events.

@arcscord/components

Typed Components V2 helpers, available through Arcscord or standalone.

@arcscord/webhooks

Typed Discord Webhook Events handling for existing web frameworks.

@arcscord/middleware

Reusable middleware for commands and components.

@arcscord/error

Result-style error handling helpers.

@arcscord/better-error

Richer Error class with debug context.

Examples

Full bots you can clone and run, from a minimal starter to a Prisma-backed ticket system.

starter-bot

The smallest end-to-end bot: typed slash and context-menu commands, a self-updating button, a component middleware, and an event listener.

reminder-bot

A user-install bot storing personal reminders in SQLite, with a background scheduler, subcommands, and a duration parser.

ticket_bot

A full support-ticket system on Discord threads: Prisma + SQLite, i18n, modals, autocomplete, and a custom result handler.