Prerequisites
Required:
- Node.js version 18.0.0 or higher
- npm, yarn, or pnpm package manager
- Git for version control
- Discord bot token (create one here)
Installation
Install dependencies
Install the required dependencies using your preferred package manager:
The bot uses discord.js v14 and requires Node.js 18+ to run properly.
Configure environment variables
Copy the example environment file and add your Discord bot token:Edit
.env and add your Discord bot token:.env
Development Commands
The project includes several npm scripts for development:| Command | Description |
|---|---|
npm run dev | Run the bot with hot reload using tsx watch |
npm run build | Compile TypeScript to JavaScript in dist/ |
npm start | Start the compiled bot from dist/index.js |
npm run typecheck | Type-check without emitting files |
npm run lint | Lint TypeScript files with ESLint |
npm run format | Format code with Prettier |
npm run deploy | Deploy slash commands to Discord |
Running the Bot
Development Mode
For active development with automatic reloading:tsx watch to automatically restart the bot when you make changes to the source code.
Production Mode
For running the built version:Project Structure
The bot follows a modular TypeScript architecture:TypeScript Configuration
The project uses strict TypeScript settings for type safety:tsconfig.json
Next Steps
Adding Platforms
Learn how to add support for new streaming platforms
Contributing
Read the contributing guidelines and best practices