forgot these additions
This commit is contained in:
parent
fad8daf05d
commit
341c8d658c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user