MericcaN41 / discordjs-v14-template-ts

A typescript template for Discord.js v14 that includes handlers, slash commands, mongodb, permissions and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Discord.js v14 Bot Template

Features

  • 🟦 Typescript
  • πŸ”₯ Slash commands (supports auto complete!)
  • βœ‰οΈ Message commands
  • πŸ•› Cooldowns
  • 🏴 Detailed Permissions
  • πŸ’ͺ Event & Command handlers
  • πŸƒ MongoDB Support

Installation, Build and Run

  1. Clone the repository then create a file named .env and fill it out accordingly
TOKEN=YOURTOKENHERE
CLIENT_ID=BOTS CLIENT ID
PREFIX=!
MONGO_URI=YOUR MONGO CONNECTION STRING
MONGO_DATABASE_NAME=YOUR DATABASE NAME
  1. Install typescript, To install TypeScript, you can run the following command in your terminal, This will install the latest version of TypeScript globally on your computer. (You can skip this if you already have typescript installed)
npm install -g typescript
  1. Build the project by running the following command:

This command will also install the node modules if you haven't installed them.

npm run build
  1. Once the build is complete it will generated a folder named build that contains compiled version of your ts code to js. You can run the following command in your terminal to run the project:
npm start

About

A typescript template for Discord.js v14 that includes handlers, slash commands, mongodb, permissions and more.


Languages

Language:TypeScript 92.5%Language:JavaScript 7.5%