Skip to content
/ DiscordJS-Template Public template

A Discord Bot built with TypeScript and Node.js following the Discord.js Guide.

License

Notifications You must be signed in to change notification settings

Ensorid/DiscordJS-Template

Repository files navigation

Discord Bot Template 🤖

Welcome to my Discord Bot template project! This bot is built using TypeScript and Node.js, following the recommendations from the Discord.js Guide.

🚀 About The Project

This project is written for fun only. I don't consider myself a developer. 🎉

📦 Features

  • Basic command and events handling
  • Cooldown support
  • High customisation
  • Log system

🛠️ Technologies Used

  • TypeScript
  • Node.js
  • Discord.js

📋 Getting Started

To get a local copy up and running, follow these simple steps:

  1. Clone the repo

    git clone https://github.com/Ensorid/DiscordJS-Template.git
  2. Install packages using PNPM

     cd DiscordJS-Template
     pnpm i
  3. Install typescript globaly in your system

     pnpm add -g typescript
  4. 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
    
  5. Run for developement

    pnpm run dev
  6. Build and run for production

    pnpm run build # Build the code to /dist folder
    pnpm run start # Start the bot from /dist folder

🐋 Docker

For production, you can use Docker by following these steps :

  1. Build your bot

    pnpm run build
  2. Build your Docker image

    docker build -t <your_bot_name> .
  3. Run your bot

    docker run --env-file .env <your_bot_name>

Important

Don't forget to replace .env with your actual environment path.

📖 Usage

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!

🤝 Contributing

I welcome any contributions, suggestions, or feedback! You can submit any issues, or submit a pull request from the appropriate sections.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A Discord Bot built with TypeScript and Node.js following the Discord.js Guide.

Resources

License

Security policy

Stars

Watchers

Forks