Quickstart Guide
Get DiscordLink running in under 5 minutes.
Prerequisites
- Node.js 18+
- pnpm (recommended) or npm
- A Discord server with forum channels
- A Discord bot token (create one here)
1. Clone the Repository
git clone https://github.com/KevinTrinh1227/discordlink.git
cd discordlink
pnpm install 2. Configure Environment
Copy the example environment file and fill in your values:
cp .env.example .env Required variables:
DISCORD_TOKEN=your_bot_token
DISCORD_CLIENT_ID=your_client_id
DATABASE_URL=file:./data/discordlink.db 3. Set Up the Database
pnpm db:push 4. Start the Services
Run the API and bot together:
pnpm dev Or run them separately:
# Terminal 1 - API
pnpm --filter @discordlink/api dev
# Terminal 2 - Bot
pnpm --filter @discordlink/bot dev 5. Invite the Bot
Generate an invite link with required permissions:
https://discord.com/api/oauth2/authorize?client_id=YOUR_CLIENT_ID&permissions=274877908992&scope=bot Required permissions:
- Read Messages/View Channels
- Read Message History
- Use Slash Commands
6. Initial Sync
Use the /sync command in your Discord server to start the initial sync. The bot will index all existing forum threads.
7. Generate Static Site
Use the CLI to export your content as a static site:
pnpm --filter @discordlink/cli build
# Export all threads
discordlink export --server YOUR_SERVER_ID --output ./dist --template faq Next Steps
- Explore templates for FAQ, Changelog, and more
- Set up webhooks for real-time notifications
- Browse use cases to see what you can build
- Read the CLI documentation for export options