mirror of
https://github.com/RafaelSolVargas/Vulkan.git
synced 2025-10-29 16:57:23 +00:00
chore(.env.example): add example .env file with configurable settings
docs(DOCKER.md): add instructions for running the bot in a Docker container docs(SETTINGS.md): update instructions for changing bot settings in .env file docs(README.md): update instructions for running the bot and add Docker instructions
This commit is contained in:
parent
a82bf7950b
commit
582e35bce1
7
.env.example
Normal file
7
.env.example
Normal file
@ -0,0 +1,7 @@
|
||||
BOT_TOKEN=Your_Own_Bot_Token
|
||||
# If you do not want to use spotify, remove the 2 following lines
|
||||
SPOTIFY_ID=Your_Own_Spotify_ID
|
||||
SPOTIFY_SECRET=Your_Own_Spotify_Secret
|
||||
BOT_PREFIX=Your_Wanted_Prefix_For_Vulkan
|
||||
SHOULD_AUTO_DISCONNECT_WHEN_ALONE=True #all settings can be set like this
|
||||
#etc... All settings can be set this way
|
||||
31
.github/Docs/DOCKER.md
vendored
Normal file
31
.github/Docs/DOCKER.md
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
<h1 align="center">Docker</h1>
|
||||
|
||||
This bot can be easily deployed using Docker.
|
||||
|
||||
## **Requirements**
|
||||
To run this project in a Docker container you must have Docker and Docker Compose installed in your machine. Find how to install Docker in your machine [here](https://docs.docker.com/get-docker/) and find how to install Docker Compose in your machine [here](https://docs.docker.com/compose/install/).
|
||||
|
||||
Once you have Docker and Docker Compose installed in your machine, clone or download this repository and follow the instructions below.
|
||||
|
||||
## **Running the Bot**
|
||||
To run the bot in a Docker container, you must first create a `.env` file in the root of the project if there isn't one already. You will need to change the parameters in the `.env` file to your own parameters. You can find an example of a `.env` file [here](.env.example). You will also be able to change the settings in that environment file as explained in the [Settings page](.github/Docs/SETTINGS.md).
|
||||
|
||||
To run the bot, simply execute the following command in the root of the project:
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
This will build the Docker image and run the bot in a Docker container. The `-d` flag is used to run the container in detached mode, which means that the container will run in the background. If you want to see the logs of the container, you can run the following command:
|
||||
```bash
|
||||
docker-compose logs -f
|
||||
```
|
||||
|
||||
To stop the container, run the following command:
|
||||
```bash
|
||||
docker-compose down
|
||||
```
|
||||
## **Updating the Bot**
|
||||
To update the bot, you must first stop the container as explained in the previous section. Then, you must pull the latest changes from the repository, in any way you want. Finally, you must build the Docker image again and run the container again. To do this, run the following commands:
|
||||
```bash
|
||||
docker-compose build
|
||||
docker-compose up -d
|
||||
```
|
||||
23
.github/Docs/SETTINGS.md
vendored
23
.github/Docs/SETTINGS.md
vendored
@ -8,31 +8,40 @@
|
||||
- Maximum songs downloading at a time
|
||||
- Maximum songs in a Queue Page
|
||||
|
||||
All parameters can be modified in the Configs.py file that are located in the Config folder
|
||||
> The path to the file is ./Config/Configs.py
|
||||
All parameters can be modified in the .env file or in an environment variable.
|
||||
Here is a sample of the .env file:
|
||||
|
||||
```env
|
||||
BOT_TOKEN=Your_Own_Bot_Token
|
||||
SPOTIFY_ID=Your_Own_Spotify_ID
|
||||
SPOTIFY_SECRET=Your_Own_Spotify_Secret
|
||||
BOT_PREFIX=Your_Wanted_Prefix_For_Vulkan
|
||||
SHOULD_AUTO_DISCONNECT_WHEN_ALONE=True #all settings can be set like this
|
||||
#etc... All settings can be set this way
|
||||
```
|
||||
|
||||
|
||||
### **Bot Prefix**
|
||||
The Bot Prefix is just a string that must be passed as prefix when calling any Bot command from the Discord.
|
||||
To change that you must: <br>
|
||||
- Change the property BOT_PREFIX of the VConfigs class to what prefix you want to.
|
||||
- Change the property BOT_PREFIX in the .env file or in an environment variable to what you want to.
|
||||
|
||||
### **Auto Disconnect**
|
||||
As a result of the [Issue 33](https://github.com/RafaelSolVargas/Vulkan/issues/33) you can configure if the Bot will auto disconnect when being alone in the voice channel. The default configuration is to disconnect within 300 seconds if it finds out no one is currently listing to it.
|
||||
To change that you must: <br>
|
||||
- Change the property SHOULD_AUTO_DISCONNECT_WHEN_ALONE of the VConfigs class to False
|
||||
- Change the property SHOULD_AUTO_DISCONNECT_WHEN_ALONE in the .env file or in an environment variable to False
|
||||
|
||||
### **Multiprocessing or Threading**
|
||||
As a result of the [Issue 35](https://github.com/RafaelSolVargas/Vulkan/issues/35) you can configure if the Bot will create a specific Python Process for each Player (Guild) that he is playing songs or all will happen in the Main Process. The Default behavior is to create a new process.
|
||||
To change that you must: <br>
|
||||
- Change the property SONG_PLAYBACK_IN_SEPARATE_PROCESS of the VConfigs class to False
|
||||
- Change the property SONG_PLAYBACK_IN_SEPARATE_PROCESS in the .env file or in an environment variable to False
|
||||
|
||||
### **Maximum Downloading Quant**
|
||||
The download of songs can be very fast or very slow, the faster it is the slower the response time for any command (during the download) is higher, (including the playback quality), because there will be a Task for each song. But it's possible to set up this variable to slow the download and keep the response time better.
|
||||
To change that you must: <br>
|
||||
- Change the property MAX_DOWNLOAD_SONGS_AT_A_TIME of the VConfigs class to what you want to.
|
||||
- Change the property MAX_DOWNLOAD_SONGS_AT_A_TIME in the .env file or in an environment variable to what you want to.
|
||||
|
||||
### **Maximum Songs In Queue Page**
|
||||
When the ```Queue``` command is called, the current song playlist is presented in the Discord, you can configure how many songs you will want to show in each page.
|
||||
To change that you must: <br>
|
||||
- Change the property MAX_SONGS_IN_PAGE of the VConfigs class to what you want to.
|
||||
- Change the property MAX_SONGS_IN_PAGE in the .env file or in an environment variable to what you want to.
|
||||
10
README.md
10
README.md
@ -62,16 +62,17 @@ You can download the executables in this link `https://www.ffmpeg.org/download.h
|
||||
|
||||
### **.Env File Example**
|
||||
This is an example of how your .env file (located in root) should look like.
|
||||
```
|
||||
```env
|
||||
BOT_TOKEN=Your_Own_Bot_Token
|
||||
SPOTIFY_ID=Your_Own_Spotify_ID
|
||||
SPOTIFY_SECRET=Your_Own_Spotify_Secret
|
||||
BOT_PREFIX=Your_Wanted_Prefix_For_Vulkan
|
||||
|
||||
SHOULD_AUTO_DISCONNECT_WHEN_ALONE=True #all settings can be set like this
|
||||
#etc... All settings can be set this way
|
||||
```
|
||||
|
||||
### **⚙️ Configs**
|
||||
The config file is located at ```./config/Configs.py```, it doesn't require any change, but if you can change the values to the way you want. <br>
|
||||
The bot's configuration is stored in the [.env](.env) file, you can change the prefix and the bot token there, as well as all the other configurations.
|
||||
Take a look in the [Settings page](.github/Docs/SETTINGS.md) to personalize the Bot for you.
|
||||
|
||||
|
||||
@ -80,6 +81,9 @@ Take a look in the [Settings page](.github/Docs/SETTINGS.md) to personalize the
|
||||
- Run ```python main.py``` in console to start
|
||||
- Give this project a nice 🌟
|
||||
|
||||
### **🐳 Docker**
|
||||
You can also run this project in a Docker container. You can find the instructions to run this project in a Docker container in the [Docker Instructions](.github/Docs/DOCKER.md) page.
|
||||
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user