Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mericcan41/discordjs-v14-template-ts

A typescript template for Discord.js v14 that includes handlers, slash commands, mongodb, permissions and more.
https://github.com/mericcan41/discordjs-v14-template-ts

discord discord-bot discord-bot-template discord-bots discord-js discord-js-template discord-js-v14 discord-js-v14-command-handler discord-js-v14-handler discord-mongodb discordjs discordjs-bot discordjs-command-handling discordjs-typescript discordjs-v14 mongodb typescript

Last synced: about 9 hours ago
JSON representation

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

Awesome Lists containing this project

README

        

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
```js
TOKEN=YOURTOKENHERE
CLIENT_ID=BOTS CLIENT ID
PREFIX=!
MONGO_URI=YOUR MONGO CONNECTION STRING
MONGO_DATABASE_NAME=YOUR DATABASE NAME
```
2) 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)
```ts
npm install -g typescript
```
3) Build the project by running the following command:

`This command will also install the node modules if you haven't installed them.`
```js
npm run build
```

4) 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:
```js
npm start
```