A modern Discord bot template built with TypeScript for scalable and maintainable bot development.
- 🤖 Discord.js v14 framework
- 📘 TypeScript for type safety
- ⚡ Slash commands support
- 🛠️ Development tools configured
- 🔧 Environment configuration
- Node.js (version 18 or higher)
- npm or yarn
- Discord Bot Token
Clone this repository and install dependencies:
git clone https://github.com/Under-scape/discordbot-ts-template
cd discordbot-ts-template
npm install
- Create a
.env
file in the root directory - Add your Discord bot token:
DISCORD_TOKEN=your_bot_token_here
CLIENT_ID=your_client_id_here
npm run start
Start the bot.
npm run build
Compile TypeScript to JavaScript for production.
npm run start
Start the production bot (requires build first).
npm run register
Deploy slash commands to Discord.
- Install dependencies:
npm install
- Configure your
.env
file with bot credentials - For start
npm run start
For development:
npm run start
For production:
npm run start
Note: This template is based on community best practices and has been customized for Discord bot development.