Welcome to my Discord Bot template project! This bot is built using TypeScript and Node.js, following the recommendations from the Discord.js Guide.
This project is written for fun only. I don't consider myself a developer. 🎉
- Basic command and events handling
- Cooldown support
- High customisation
- Log system
- TypeScript
- Node.js
- Discord.js
To get a local copy up and running, follow these simple steps:
-
Clone the repo
git clone https://github.com/Ensorid/DiscordJS-Template.git
-
Install packages using PNPM
cd DiscordJS-Template pnpm i
-
Install typescript globaly in your system
pnpm add -g typescript
-
Set up your environment variables Copy the
.env.example
to.env
file in the root directory then add your Discord bot token and ClientId:TOKEN=YOUR_TOKEN CLIENTID=YOUR_CLIENT_ID
-
Run for developement
pnpm run dev
-
Build and run for production
pnpm run build # Build the code to /dist folder pnpm run start # Start the bot from /dist folder
For production, you can use Docker by following these steps :
-
Build your bot
pnpm run build
-
Build your Docker image
docker build -t <your_bot_name> .
-
Run your bot
docker run --env-file .env <your_bot_name>
Important
Don't forget to replace .env with your actual environment path.
Once the bot is running, you can interact with it in your Discord server. Use the commands defined in the bot to see what it can do!
I welcome any contributions, suggestions, or feedback! You can submit any issues, or submit a pull request from the appropriate sections.
This project is licensed under the MIT License - see the LICENSE file for details.