Skip to content

eliware/player

Repository files navigation

eliware.org

@eliware/player npm versionlicensebuild status

A modern Discord app built with Node.js, based on the @eliware/discord foundation.


Table of Contents

Features

  • 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

Getting Started

  1. Clone this project:

    git clone https://github.com/eliware/player.git
    cd player
    npm install
  2. Set up your environment:

    • Copy .env.example to .env and fill in your Discord app token and other secrets.
    • Edit package.json (name, description, author, etc.)
    • Update this README.md as needed.
  3. Start the app locally:

    npm start
    # or
    node player.mjs

Configuration

  • All configuration is handled via environment variables in the .env file.
  • See .env.example for required and optional variables.

Running as a Service (systemd)

  1. Copy player.service to /usr/lib/systemd/system/player.service.

  2. Edit the paths and user/group as needed.

  3. Reload systemd and start the service:

    sudo systemctl daemon-reload
    sudo systemctl enable player
    sudo systemctl start player
    sudo systemctl status player

Docker

  1. Build the Docker image:

    docker build -t player .
  2. Run the container:

    docker run --env-file .env player

Customization

Commands

  • Add new commands in the commands/ directory.
  • Each command has a .json definition (for Discord registration/localization) and a .mjs handler (for logic).

Events

  • Add or modify event handlers in the events/ directory.
  • Each Discord event (e.g., ready, messageCreate, interactionCreate) has its own handler file.

Locales

  • Add or update language files in the locales/ directory.
  • Localize command names, descriptions, and app responses.

Testing

  • Run tests with:

    npm test
  • Add your tests in the tests/ folder or alongside your code.

Support

For help, questions, or to chat with the author and community, visit:

Discordeliware.org

eliware.org on Discord

License

MIT © 2025 Eli Sterling, eliware.org

Links

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published