diff --git a/Config/Configs.py b/Config/Configs.py
index b7527ae..3d1f6ba 100644
--- a/Config/Configs.py
+++ b/Config/Configs.py
@@ -7,6 +7,10 @@ from Config.Folder import Folder
class VConfigs(Singleton):
def __init__(self) -> None:
if not super().created:
+ # You can change this boolean to False if you want to prevent the Bot from auto disconnecting
+ # Resolution for the issue: https://github.com/RafaelSolVargas/Vulkan/issues/33
+ self.SHOULD_AUTO_DISCONNECT_WHEN_ALONE = True
+
self.BOT_PREFIX = '!'
try:
self.BOT_TOKEN = config('BOT_TOKEN')
diff --git a/Parallelism/PlayerProcess.py b/Parallelism/PlayerProcess.py
index 85fbfc8..f20611e 100644
--- a/Parallelism/PlayerProcess.py
+++ b/Parallelism/PlayerProcess.py
@@ -297,6 +297,9 @@ class PlayerProcess(Process):
if self.__guild.voice_client is None:
return
+ if not VConfigs().SHOULD_AUTO_DISCONNECT_WHEN_ALONE:
+ return
+
if self.__guild.voice_client.is_playing() or self.__guild.voice_client.is_paused():
if not self.__isBotAloneInChannel(): # If bot is not alone continue to play
self.__timer = TimeoutClock(self.__timeoutHandler, self.__loop)
diff --git a/README.md b/README.md
index fc42c47..66ef148 100644
--- a/README.md
+++ b/README.md
@@ -69,7 +69,7 @@ BOT_PREFIX=Your_Wanted_Prefix_For_Vulkan
```
### **⚙️ Configs**
-The config file is located at ```./config/Configs.py```, it doesn't require any change, but if you can change values to the way you want.
+The config file is located at ```./config/Configs.py```, it doesn't require any change, but if you can change values to the way you want.
### **Initialization**
@@ -77,6 +77,13 @@ The config file is located at ```./config/Configs.py```, it doesn't require any
- Run ```python main.py``` in console to start
+### **Configuring Auto Disconnect**
+As a result of the [Issue 33](https://github.com/RafaelSolVargas/Vulkan/issues/33) now 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:
+- Change the property SHOULD_AUTO_DISCONNECT_WHEN_ALONE of the VConfigs class to False
+> The path to the file is ./Config/Configs.py
+
+