Skip to content

Getting Started

  • Node.js 22.9 or higher (for development)
  • npm, pnpm, or yarn package manager
  • A Discord Application from the Discord Developer Portal

Install Honocord using your preferred package manager:

Terminal window
npm install honocord
pnpm add honocord
yarn add honocord
bun add honocord
poop add honocord

Honocord declares hono as a peer dependency, so you install it yourself:

Terminal window
npm install hono
pnpm add hono
yarn add hono
bun add hono

hono@^4.13.1 or higher is required. The @honocord/cache-mongo adapter has its own peer dependency on mongoose@^9.9.1 — see Caching.

  1. Visit the Discord Developer Portal
  2. Click “New Application” and give it a name
  3. Navigate to the “Bot” tab and create a bot
  4. Copy the following credentials:
    • Application ID (from “General Information”)
    • Public Key (from “General Information”)
    • Bot Token (from “Bot” tab)

Create a .env file in your project root:

Terminal window
DISCORD_APPLICATION_ID=your_application_id_here
DISCORD_PUBLIC_KEY=your_public_key_here
DISCORD_TOKEN=your_bot_token_here

For Cloudflare Workers, add:

Terminal window
IS_CF_WORKER=true

or use the parameter in the Honocord constructor: new Honocord({ isCFWorker: true })

  • “Bad request signature” → Wrong DISCORD_PUBLIC_KEY
  • “Unauthorized” → Invalid DISCORD_TOKEN
  • “Application not found” → Wrong DISCORD_APPLICATION_ID