A modern TypeScript template for creating Discord bots with ForgeScript, featuring a clean project structure and development tools.
- TypeScript Support: Full TypeScript support with strict type checking
- Modern ES Modules: Built with ES modules for better code organization
- Pre-configured Build System: Ready-to-use build scripts
- Developer Tools: Includes useful developer commands
- SQLite Database: Integrated with ForgeDB for data persistence
- Canvas Support: Includes ForgeCanvas for image manipulation
- Node.js 18+ (recommended: latest LTS version)
- npm or yarn package manager
- Git
-
Clone the repository:
git clone https://github.com/yourusername/forge-typescript-template.git cd forge-typescript-template -
Install dependencies:
npm install # or yarn install -
Create a
.envfile in the root directory with your bot token:TOKEN=your_discord_bot_token_here
-
Build the project:
npm run build # or yarn build -
Start the bot:
npm start # or yarn start -
Start the bot in development mode:
npm run dev
# or
yarn dev├── src/
│ ├── commands/ # Text commands
│ ├── slash/ # Slash commands
│ └── index.ts # Main bot entry point
├── database/ # Database files
├── dist/ # Compiled JavaScript
├── .env # Environment variables
├── package.json # Project dependencies
└── tsconfig.json # TypeScript configuration
npm run buildoryarn build: Compiles TypeScript to JavaScriptnpm startoryarn start: Builds and runs the botnpm run devoryarn dev: Builds and runs the bot in development mode
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For support, please open an issue on the GitHub repository.