Template

Discord bot (Node.js, discord.js 14)

Slash commands with a registration script, Guilds intent only, ephemeral replies and mentions disabled in echoed text.

Download ZIP (6.2 KB)

SHA-256: 8897c80daa36cde4382aeb57e8289b7cfae67c65b98261840fa5584c1fd86f83 (checksum file)

Stack: Node.js 20+, discord.js 14 · License: MIT · Files: 11

What it includes

Slash commands with a registration script, Guilds intent only, ephemeral replies and mentions disabled in echoed text.

File tree

discord-js/
├── src/
│   ├── commands.js
│   ├── index.js
│   └── register.js
├── tests/
│   └── commands.test.js
├── .dockerignore
├── .env.example
├── .gitignore
├── Dockerfile
├── LICENSE
├── package.json
└── README.md

Setup

unzip discord-js.zip && cd discord-js
npm install
cp .env.example .env
npm run register
npm run dev
npm test

Fill in .env with credentials from the platform's official developer console. Never commit it: the included .gitignore excludes it.

Run with Docker

docker build -t discord-js .
docker run --rm --env-file .env discord-js

Official documentation

https://discord.js.org

All templates