From 341c8d658c09f1062c1527f551cfabae7928ec61 Mon Sep 17 00:00:00 2001 From: jenz Date: Tue, 15 Oct 2024 20:20:02 +0200 Subject: [PATCH] forgot these additions --- .../torchlight3/Torchlight/Commands.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py b/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py index f2810cd7..95d2edc6 100755 --- a/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py +++ b/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py @@ -596,7 +596,7 @@ class VoiceCommands(BaseCommand): if Num and Num > 0 and Num <= len(Sounds): Sound = Sounds[Num - 1] - elif message[1] and not message[1].startswith("tempo=") and not message[1].startswith("pitch="): #it does not start with pitch or with tempo, so must be a number or alias. + elif message[1] and not message[1].startswith("tempo=") and not message[1].startswith("pitch=") and not message[1].startswith('backward=') and not message[1].startswith('backwards='): #it does not start with pitch or with tempo, so must be a number or alias. searching = message[1].startswith('?') search = message[1][1:] if searching else message[1].split(" ")[0] Sound = None @@ -703,7 +703,7 @@ class YouTubeSearch(BaseCommand): Time = Utils.ParseTime(TimeStr) message[1] = message[1][:Temp.value] - search_term = message[1].split("pitch=")[0].split("tempo=")[0] + search_term = message[1].split("pitch=")[0].split("tempo=")[0].split('backward=')[0].split('backwards=')[0] Proc = await asyncio.create_subprocess_exec("yt-dlp", "--dump-json", "--username", "oauth2", "--password", "''", "-xg", "ytsearch:" + search_term, stdout = asyncio.subprocess.PIPE) Out, _ = await Proc.communicate() @@ -739,7 +739,7 @@ class Say(BaseCommand): self.Level = 2 async def Say(self, player, language, message): - actual_message = message.split("pitch=")[0].split("tempo=")[0] + actual_message = message.split("pitch=")[0].split("tempo=")[0].split('backward=')[0].split('backwards=')[0] GTTS = self.gtts.gTTS(text = actual_message, lang = language) TempFile = self.tempfile.NamedTemporaryFile(delete = False)