A cool pal ready to hang out in your Discord server
- node v8.0.0 or greater
- npm dependencies
Install globally with your package manager, or use nvm: https://github.com/creationix/nvm
git clone https://github.com/coolfriends/coolpal.git
cd coolpal
npm install
Link the local executable to your /usr/bin path
npm link
coolpal --help
Run bundle steps
npm run bundle
Run bot
npm start
Run bot as daemon with Forever from source directory
forever start --minUptime 100000000 ./dist/bin.bundle.js
When looking for a configuration file, the following are checked in order:
- CLI argument
- Default configuration file name
To start the bot without putting a token in the configuration file, export the following environment variable:
export COOLPAL_DISCORD_TOKEN="your-token"
Make sure you have docker installed: https://docs.docker.com/engine/installation/
Build image from Dockerfile
docker build --no-cache -t coolpal .
Run container in detached mode
docker run -d coolpal
Run container and enter shell
docker run -it coolpal
Make sure to run npm install
to get the mocha dev dependency.
Then run the tests like so:
npm test
## Create docs
```bash
npm run docs
npm run format
## Pre-commit
The `precommit` script in `package.json` runs on any add. This will enforce
good style. Make sure to have the latest dev-deps installed with `npm install`
- Get webpack working with a shebang line in
bin/coolpal
so it can become a linked executable withnpm link