Fixing error in starting playing songs that the Player lost reference to the current playing song

This commit is contained in:
Rafael Vargas
2023-01-24 19:42:57 -03:00
parent 7310eda1a1
commit 5cdc4e9a53
4 changed files with 7 additions and 4 deletions

View File

@@ -14,6 +14,7 @@ from Parallelism.Commands import VCommands, VCommandsType
from Music.VulkanBot import VulkanBot
from typing import Union
from discord import Interaction
from Music.Playlist import Playlist
class PlayHandler(AbstractHandler):
@@ -38,7 +39,7 @@ class PlayHandler(AbstractHandler):
# Get the process context for the current guild
processManager = self.config.getProcessManager()
processInfo = processManager.getOrCreatePlayerInfo(self.guild, self.ctx)
playlist = processInfo.getPlaylist()
playlist: Playlist = processInfo.getPlaylist()
process = processInfo.getProcess()
if not process.is_alive(): # If process has not yet started, start
process.start()