Skip to content

towsifkafi/DiscordJS-v14-Template

Repository files navigation

Discord.JS v14 Template (Typescript)

A simple Discord.js v14 template written in Typescript, ready to use.

Some of the main focuses of this template are:

  • Message Command, Slash Command, Event, App and Modal handlers.
  • Command handlers also include permissions, aliases, and autocomplete functionality.
  • Cooldowns for commands.

How to Install

  • You'll need NodeJS (22.12.0+). And a package manager for node. (npm, pnpm or yarn)
  • To get started with this project clone this repository to a folder and execute the following commands to that folder.
npm install 
# or
pnpm install
  • Once all dependencies are installed, rename .env.example to .env and enter environment values CLIENT_ID, TOKEN and TEST_GUILD in this file. If you leave TEST_GUILD empty, the bot will register slash commands to all servers.

  • Your application needs the following intents to be allowed PRESENCE, MESSAGE and GUILD MEMBER. You can enable them in your Discord Developer Dashboard or disable the intents you don't need from index.ts file. Privileged intents are are marked with comments.

After finishing the cofiguration run -

npm run dev

If everything is done correctly, your terminal should look like this - Start


If you happen to spot any problem or errors in this project, please create a pull request or contact me through my Discord, which is @towsif.kafi. I'm always open to receiving direct messages and would be more than happy to help you out in any way possible.

About

A simple Discord.JS v14 message command/slash command and apps handler template.

Topics

Resources

License

Stars

6 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors