Skip to content

Commit b7ba649

Browse files
committed
organised docs
1 parent 13834f7 commit b7ba649

12 files changed

Lines changed: 98 additions & 116 deletions

File tree

.dockerignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ Dockerfile
1818
.dockerignore
1919

2020
# Documentation and metadata files
21+
docs
22+
previews
2123
README.md
22-
COMMANDS.md
23-
CONTRIBUTING.md
2424
LICENSE
2525
SECURITY.md
2626

27+
# Scripts
28+
scripts
29+
2730
# Configuration files
2831
.editorconfig
2932
.prettierignore

README.md

Lines changed: 23 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -17,126 +17,44 @@ It is a Discord music bot built using [discord-player](https://npm.im/discord-pl
1717

1818
## Table of Contents
1919

20-
- [Features](#features)
2120
- [Disclaimer](#disclaimer)
22-
- [Installation](#installation)
23-
- [Before you start](#before-you-start)
24-
- [Config](#config)
25-
- [Local Installation](#local-installation)
26-
- [Docker Installation](#docker-installation)
27-
- [Usage](#usage)
28-
- [Contributing](#contributing)
21+
- [Features](#features)
22+
- [Docs](docs/README.md):
23+
- [Commands](docs/COMMANDS.md)
24+
- [Installation](docs/INSTALLATION.md)
25+
- [Prerequisites](docs/INSTALLATION.md#prerequisites)
26+
- [Configuration](docs/INSTALLATION.md#configuration)
27+
- [Local Installation](docs/INSTALLATION.md#local-installation)
28+
- [Docker Installation](docs/INSTALLATION.md#docker-installation)
29+
- [Contributing](docs/CONTRIBUTING.md)
2930
- [License](#license)
3031
- [Help](#help)
3132
- [Feedback](#feedback)
3233
- [Star History](#star-history)
3334
- [Supporters](#supporters)
3435

35-
## Features
36-
37-
- **Beginner-Friendly**: Designed with simplicity in mind, making it easy for users of all skill levels to understand and use.
38-
- **Quick Setup**: Get the bot up and running swiftly with straightforward installation instructions and minimal configuration requirements.
39-
- **Versatile Commands**: A comprehensive range of commands to cater to various music playback needs, ensuring an enjoyable listening experience for all users.
40-
- **Audio Filters**: Customize your listening experience with 25 FFmpeg filters, 18 Equalizer presets, and 10 Biquad filters.
41-
- **Multi-Guild Support**: Effortlessly manage the bot across multiple Discord guilds, providing flexibility for diverse communities.
42-
- **Various Sources**: Play music from a wide range of sources, including YouTube, Spotify, SoundCloud, Apple Music, Reverbnation, Deezer, Tidal, and more.
43-
- **Slash Commands**: Take advantage of slash commands for seamless interaction with the bot, enhancing user experience and accessibility.
44-
4536
## Disclaimer
4637

47-
This project is intended for educational and entertainment purposes only. It is not designed to encourage or facilitate any form of unfair usage. If you represent a supported streaming platform and have concerns about the bot's functionality, please reach out to us via GitHub Discussions or our support channels for a constructive dialogue.
48-
49-
## Installation
50-
51-
### Before You Start
52-
53-
Before diving into the setup process, ensure you have the following prerequisites:
54-
55-
- **Discord Token** A Discord application with a bot token. You can create one by following the [Discord Developer Portal](https://discord.com/developers/applications) guide.
56-
57-
- **Node.js**: Version 20 or higher is required. If you haven't already installed Node.js, you can download it from the [official website](https://nodejs.org/en/download/).
58-
- **NPM**: A package manager is required. NPM comes bundled with Node.js, so no separate installation is required.
59-
- **FFmpeg or Avconv**: Ensure you have FFmpeg or Avconv installed for media transcoding. You can download (recommended) FFmpeg from the [official website](https://ffmpeg.org/download.html) or install it via npm `npm i ffmpeg-static`.
60-
61-
### Config
62-
63-
To configure the Discord Player Bot, you'll need to set up environment variables in a `.env` file. Here's how to do it:
64-
65-
1. **Create `.env` File**: In the root directory of the cloned repository, create a new file named `.env`.
66-
67-
2. **Use `.env.sample` as Template**: Open the `.env.sample` file provided in the repository. This file contains a template with placeholders for environment variables.
68-
69-
3. **Fill in Environment Variables**: Replace the placeholder values in the `.env.sample` file with your actual values. Refer to the comments in the file for guidance on each variable.
70-
71-
4. **Save as `.env`**: After filling in the environment variables, save the file as `.env` in the same directory. This file will be used by the bot to load configuration during runtime.
72-
73-
5. **Review Configuration**: Double-check the configuration in the `.env` file to ensure that all necessary variables are properly set.
74-
75-
By following these steps and customizing the `.env` file with your specific configuration, you can effectively set up the Discord Player Bot according to your requirements.
76-
77-
### Local Installation
38+
This project is not affiliated with Discord or any streaming platforms. It is intended for educational and entertainment purposes only. It is not designed to encourage or facilitate any form of unfair usage. If you represent a supported streaming platform and have concerns about the bot's functionality, please reach out to us via GitHub Discussions or our support channels for a constructive dialogue.
7839

79-
1. **Fill the `.env` File**: Ensure that you have filled out the necessary environment variables in the `.env` file as described above.
80-
81-
2. **Install Dependencies**: Install the required dependencies by running the following command in the project directory:
82-
83-
```bash
84-
npm install
85-
```
86-
87-
3. **Register Slash Commands**: If you are using this bot for the first time or have added new commands, you need to register the slash commands with Discord. Run the following command:
88-
89-
```bash
90-
npm run register
91-
```
92-
93-
This will register all the slash commands defined in your project with Discord. You should see a message indicating the number of commands registered.
94-
95-
4. **Run the Bot**: Start the bot by running:
96-
97-
```bash
98-
npm start
99-
```
100-
101-
This will launch the bot, and it will connect to Discord using the provided token.
102-
103-
### Docker Installation
104-
105-
If you prefer to use Docker for deploying the Discord Player Bot, follow these steps:
106-
107-
1. **Fill the `.env` File**: Ensure that you have filled out the necessary environment variables in the `.env` file as described above.
108-
109-
2. **Pull Docker Image**: Run the following command in terminal:
110-
111-
```bash
112-
docker pull lakhindarpal/discord-player-bot:latest
113-
```
114-
115-
This command will pull the latest image of discord-player-bot from docker hub.
116-
117-
3. **Run Docker Container**: Once the Docker image is pulled successfully, you can run the Docker container using the following command:
118-
119-
```bash
120-
docker run --env-file .env lakhindarpal/discord-player-bot:latest
121-
```
122-
123-
4. **Enjoy Dockerized Discord Player Bot**: Your Discord Player Bot should now be running in a Docker container, ready to provide music playback functionality in your Discord server.
40+
## Features
12441

125-
By following these steps, you can deploy the Discord Player Bot using Docker, providing a convenient and isolated environment for running the bot.
42+
- **Beginner-Friendly**: Easy to use for all skill levels.
43+
- **Quick Setup**: Simple docker installation with minimal configuration.
44+
- **Various Sources**: Stream music from YouTube, Spotify, SoundCloud, Apple Music, Deezer, Tidal, and more.
45+
- **Audio Filters**: Customize audio with 25 FFmpeg filters, 18 equalizer presets, and 10 biquad filters.
46+
- **Button Control**: Intuitive buttons for easy music control.
47+
- **Slash Commands**: Seamless interaction through intuitive slash commands.
48+
- **Versatile Commands**: Extensive range of music playback commands.
49+
- **Multi-Guild Support**: Manage the bot across multiple Discord servers.
12650

127-
## Usage
51+
## Previews
12852

129-
Once the bot is running and added to your Discord server, you can use the features it provides.
130-
For detailed command usage and examples, please refer to the [Commands](./COMMANDS.md) documentation.
53+
![Play Song](previews/play_song.png)
13154

132-
## Contributing
55+
## Docs
13356

134-
1. [Fork the repo](https://github.com/LakhindarPal/discord-player-bot/fork)
135-
2. Install the dependencies (`npm install`)
136-
3. Create the feature branch (`git checkout -b my-cool-feature`)
137-
4. Commit your changes (`git commit -m "Added a cool new feature!"`)
138-
5. Push to your branch (`git push origin my-cool-feature`)
139-
6. [Open a pull request](https://github.com/LakhindarPal/discord-player-bot/pulls)
57+
[View docs](docs/README.md)
14058

14159
## License
14260

bun.lockb

0 Bytes
Binary file not shown.
File renamed without changes.
File renamed without changes.

docs/INSTALLATION.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Installation
2+
3+
## Prerequisites
4+
5+
Ensure you have the following before setup:
6+
7+
- **Discord Token**: Obtain from the [Discord Developer Portal](https://discord.com/developers/applications).
8+
- **Node.js**: Version 20 or higher. Download [here](https://nodejs.org/en/download/).
9+
- **NPM**: Comes with Node.js.
10+
- **FFmpeg or Avconv**: Required for media transcoding. Download [FFmpeg](https://ffmpeg.org/download.html) or install via npm: `npm i ffmpeg-static`
11+
12+
## Configuration
13+
14+
1. **DISCORD_TOKEN**: Bot token for Discord API.
15+
2. **CLIENT_ID**: Bot application ID to register slash commands.
16+
3. **DEV_GUILD**: ID of the development server.
17+
4. **DEV_IDS**: Comma-separated list of developer IDs.
18+
5. **SUPPORT_SERVER**: Link to the discord support server.
19+
20+
### Setup Steps
21+
22+
1. **Create `.env` File**: In the root directory, create `.env`.
23+
2. **Use `.env.sample`**: Copy and replace placeholders with your values.
24+
3. **Save as `.env`**: Ensure all variables are correctly filled.
25+
26+
## Local Installation
27+
28+
1. **Clone the Repository**: `git clone https://github.com/LakhindarPal/discord-player-bot && cd discord-player-bot`
29+
2. **Install Dependencies**: `npm install`
30+
3. **Fill the `.env` File**: Ensure all configurations are set as describe above.
31+
4. **Register Slash Commands**: `npm run register`
32+
5. **Run the Bot**: `npm start`
33+
34+
## Docker Installation
35+
36+
1. **Fill the `.env` File**: Ensure all configurations are set as described above.
37+
2. **Pull Docker Image**: `docker pull lakhindarpal/discord-player-bot:latest`
38+
3. **Run Docker Container**: `docker run --env-file .env lakhindarpal/discord-player-bot:latest`
39+
4. **Register Slash Commands**: `docker exec -it <container_id> npm run register`

docs/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Docs
2+
3+
## Index
4+
5+
- [Commands](COMMANDS.md)
6+
- [Installation](INSTALLATION.md)
7+
- [Prerequisites](INSTALLATION.md#prerequisites)
8+
- [Configuration](INSTALLATION.md#configuration)
9+
- [Local Installation](INSTALLATION.md#local-installation)
10+
- [Docker Installation](INSTALLATION.md#docker-installation)
11+
- [Contributing](CONTRIBUTING.md)
12+
13+
## Links
14+
15+
[![Docker Hub](https://img.shields.io/badge/Docker-Hub-blue?style=for-the-badge&logo=docker)](https://hub.docker.com/r/lakhindarpal/discord-player-bot)
16+
[![Support](https://img.shields.io/badge/Discord-Support-blue?style=for-the-badge&logo=discord)](https://discord.gg/8yaJBZBQTA)
17+
18+
---
19+
20+
[Return to index](../README.md)

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
{
22
"name": "discord-player-bot",
3-
"version": "3.3.0",
3+
"version": "3.3.1",
44
"description": "A discord music bot built using discord.js and discord-player",
55
"main": "src/index.js",
66
"type": "module",
77
"scripts": {
88
"lint": "eslint .",
99
"lint:fix": "eslint . --fix",
1010
"format": "prettier . --write",
11-
"register": "node src/scripts/register.js",
12-
"doc": "node src/scripts/cmd-doc.js",
11+
"doc": "node scripts/cmd-doc.js",
12+
"build": "docker build -t lakhindarpal/discord-player-bot:latest .",
13+
"run": "docker run --env-file .env lakhindarpal/discord-player-bot:latest",
14+
"register": "node scripts/register.js",
1315
"start": "node .",
1416
"dev": "node --watch-path=./src ."
1517
},

previews/play_song.png

124 KB
Loading

0 commit comments

Comments
 (0)