A modern Discord app built with Node.js, based on the @eliware/discord foundation.
- Features
- Getting Started
- Configuration
- Running as a Service (systemd)
- Docker
- Customization
- Testing
- Support
- License
- Discord.js-based app with ESM support
- Command and event handler architecture
- Multi-language/localized responses
- Environment variable support via dotenv
- Logging and signal handling via
@eliware/common - Ready for deployment with systemd or Docker
- Jest for testing
-
Clone this project:
git clone https://github.com/eliware/discord-template.git cd discord-template npm install -
Set up your environment:
- Copy
.env.exampleto.envand fill in your Discord app token and other secrets. - Edit
package.json(name, description, author, etc.) - Update this
README.mdas needed.
- Copy
-
Start the app locally:
npm start # or node discord-template.mjs
- All configuration is handled via environment variables in the
.envfile. - See
.env.examplefor required and optional variables.
-
Copy
discord-template.serviceto/usr/lib/systemd/system/discord-template.service. -
Edit the paths and user/group as needed.
-
Reload systemd and start the service:
sudo systemctl daemon-reload sudo systemctl enable discord-template sudo systemctl start discord-template sudo systemctl status discord-template
-
Build the Docker image:
docker build -t discord-template . -
Run the container:
docker run --env-file .env discord-template
- Add new commands in the
commands/directory. - Each command has a
.jsondefinition (for Discord registration/localization) and a.mjshandler (for logic).
- Add or modify event handlers in the
events/directory. - Each Discord event (e.g.,
ready,messageCreate,interactionCreate) has its own handler file.
- Add or update language files in the
locales/directory. - Localize command names, descriptions, and app responses.
-
Run tests with:
npm test -
Add your tests in the
tests/folder or alongside your code.
For help, questions, or to chat with the author and community, visit:


