A bot in a few lines
Create a client, declare a typed slash command, and register it.
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]);
TypeScript-first
Handlers infer their context from your command definition. Options, autocomplete, and components are typed end to end.
Flexible error handling
Return nothing for simple handlers, or a typed Result for explicit failures. Returned and thrown errors flow through configurable result handlers.
Composable middleware
Reusable middleware for commands and components with next, cancel, and error control flow.
Built on discord.js
ArcClient extends the discord.js Client. Every option, event, and REST method you already know still works.
Installation
Requires Node.js 24.11.0 or newer, or Bun 1.3.0 or newer, and TypeScript 5.4 or newer.
- pnpm
- npm
- yarn
- bun
pnpm add arcscord discord.js
npm install arcscord discord.js
yarn add arcscord discord.js
bun add arcscord discord.js
Packages
Install only what you need. Each package ships its own types.
Examples
Full bots you can clone and run, from a minimal starter to a Prisma-backed ticket system.
starter-botThe smallest end-to-end bot: typed slash and context-menu commands, a self-updating button, a component middleware, and an event listener.
reminder-botA user-install bot storing personal reminders in SQLite, with a background scheduler, subcommands, and a duration parser.
ticket_botA full support-ticket system on Discord threads: Prisma + SQLite, i18n, modals, autocomplete, and a custom result handler.
