Getting Started
Learn how to set up Honocord and create your first bot.
Requirements
- Node.js 24 or higher (for development)
- npm, pnpm, or yarn package manager
- A Discord Application from the Discord Developer Portal
Package Installation
Install Honocord using your preferred package manager:
Required Dependencies
Honocord declares hono as a peer dependency, so you install it yourself:
hono@^4.13.1 or higher is required. The MongoDB cache adapter (honocord/cache/mongo) has an optional peer
dependency on mongoose@^9.9.1 — see Caching.
Discord Application Setup
- Visit the Discord Developer Portal
- Click “New Application” and give it a name
- Navigate to the “Bot” tab and create a bot
- Copy the following credentials:
- Application ID (from “General Information”)
- Public Key (from “General Information”)
- Bot Token (from “Bot” tab)
Environment Configuration
Create a .env file in your project root:
Cloudflare Workers Specific
For Cloudflare Workers, add:
or use the parameter in the Honocord constructor: new Honocord({ isCFWorker: true })
Common Errors
- “Bad request signature” → Wrong
DISCORD_PUBLIC_KEY - “Unauthorized” → Invalid
DISCORD_TOKEN - “Application not found” → Wrong
DISCORD_APPLICATION_ID