Getting Started
Requirements
Section titled “Requirements”- Node.js 22.9 or higher (for development)
- npm, pnpm, or yarn package manager
- A Discord Application from the Discord Developer Portal
Package Installation
Section titled “Package Installation”Install Honocord using your preferred package manager:
npm install honocordpnpm add honocordyarn add honocordbun add honocordpoop add honocordRequired Dependencies
Section titled “Required Dependencies”There shouldn’t be any needed peer dependencies, but if there is an issue with that - open an issue.
Discord Application Setup
Section titled “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
Section titled “Environment Configuration”Create a .env file in your project root:
DISCORD_APPLICATION_ID=your_application_id_hereDISCORD_PUBLIC_KEY=your_public_key_hereDISCORD_TOKEN=your_bot_token_hereCloudflare Workers Specific
Section titled “Cloudflare Workers Specific”For Cloudflare Workers, add:
IS_CF_WORKER=trueor use the parameter in the Honocord constructor: new Honocord({ isCFWorker: true })
Common Errors
Section titled “Common Errors”- “Bad request signature” → Wrong
DISCORD_PUBLIC_KEY - “Unauthorized” → Invalid
DISCORD_TOKEN - “Application not found” → Wrong
DISCORD_APPLICATION_ID