diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2024-02-17 00:07:31 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-17 00:07:31 -0500 |
| commit | 214a83c0f696ac731c54b00bf7503f87e497afa6 (patch) | |
| tree | 15d57b08e69d19fb4c2f3effb9937aec8d042bdc /README.md | |
| parent | b29ab06623fd24cfc2a611bdd658b4d2ef934335 (diff) | |
| parent | c848f1d90fef40ffa81915d7dd875a2ee6d6c8d5 (diff) | |
| download | DLAP-214a83c0f696ac731c54b00bf7503f87e497afa6.tar.gz DLAP-214a83c0f696ac731c54b00bf7503f87e497afa6.tar.bz2 DLAP-214a83c0f696ac731c54b00bf7503f87e497afa6.zip | |
Merge pull request #17 from Alee14/testing
Merging testing branch
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 37 |
1 files changed, 33 insertions, 4 deletions
@@ -15,10 +15,38 @@ If you want to become a maintainer, you must at least know this source code, Jav Also you must join my discord server (Support Server) to communicate with me. # Recommended Software Requirements -- Latest version of NodeJS (v16.9.0+) +- Latest version of NodeJS (v16.11.0+) - Linux (or WSL for Windows users) - Yarn Package Manager -- NodeJS v18.5.0+ + +# Docker +First install Docker then using CMD or a terminal change directory to DLAP root folder and type the following: +``` +docker build -t dlap . +``` + +- the -t flag specifies a tag that will be assigned to the image. With it, we can easily run the image that the tag was assigned to. +- the dot at the end is basically the path to search for Dockerfile. The dot means current directory (./) +- Run the container + +Follow the guide below and when ready type the following +``` +docker run -d -v <path to config>:/usr/src/bot/config.json -v <path to music>:/usr/src/bot/music --name dlap dlap:latest +``` + +- -d flag tells Docker to run the container in detached mode, meaning it will run the container in the background of your terminal and not give us any output from it. If we don't provide it, the run will be giving us the output until the application exits. Discord bots aren't supposed to exit after certain time, so we do need this flag +- -v flag in Docker is used for volume mounting. It creates a bind mount, which allows you to specify a host path (on your local machine) and a container path (inside the Docker container). When the Docker container is run, the specified host path is mounted into the container at the specified container path. +- --name assigns a name to the container. By default, container is identified by id that is not human-readable. To conveniently refer to container when needed, we can assign it a name +- dlap:latest means "latest version of dlap image" + +View logs (optional) +``` +docker logs -f dlap +``` + +- -f flag tells the docker to keep reading logs as they appear in container and is called "follow mode". To exit press CTRL + C. + +*Docker guide partially taken from [PythonDiscord](https://www.pythondiscord.com/pages/guides/python-guides/docker-hosting-guide/#creating-dockerfile)* # Configuration Make a new file called `config.json` inside the root of your project. @@ -33,8 +61,9 @@ Make a new file called `config.json` inside the root of your project. "clientID": "client_id", "ownerID": "your_user_id", "djRole": "role_id", + "locale": "en", "presenceActivity": "activity_here", - "activityType": [0 (Playing)/1 (Streaming)/2 (Listening)/3 (Watching)/4 (Custom)/5 (Competing)] + "activityType": [0 (Playing)/1 (Streaming)/2 (Listening)/3 (Watching)/4 (Custom)/5 (Competing)], } ``` @@ -112,7 +141,7 @@ shutdown - Powers off the bot. # Forking When forking the project, you can make your own version of DLAP or help contribute to the project (See the "Contributing" section). -You need to edit `/commands/about.js` to uncomment the `{ name: 'Forked by', value: '[your name] (discord#0000)' }` section. +You need to edit `/commands/about.js` to uncomment the `{ name: 'Forked by', value: '[your name] (username)' }` section. Be sure to replace that with your name. |
