Fixing errors when closing the player info and trying to access it again

This commit is contained in:
Rafael Vargas
2023-03-14 00:25:33 -03:00
parent db405285ac
commit 8f18ef3f2e
13 changed files with 28 additions and 27 deletions

View File

@@ -46,7 +46,7 @@ class ThreadPlayerManager(Singleton, AbstractPlayersManager):
self.__bot = bot
self.__playersThreads: Dict[int, ThreadPlayerInfo] = {}
async def sendCommandToPlayer(self, command: VCommands, guild: Guild, forceCreation: bool = False, context: Union[Context, Interaction] = None):
async def sendCommandToPlayer(self, command: VCommands, guild: Guild, context: Union[Context, Interaction], forceCreation: bool = False):
playerInfo = self.__playersThreads[guild.id]
player = playerInfo.getPlayer()
if player is None and forceCreation: