fixed so aliases work again

This commit is contained in:
jenz 2024-08-06 00:34:13 +02:00
parent e29eb32a91
commit 2fbe20740f

View File

@ -561,7 +561,7 @@ class VoiceCommands(BaseCommand):
if isinstance(Sounds, list): if isinstance(Sounds, list):
if Num and Num > 0 and Num <= len(Sounds): if Num and Num > 0 and Num <= len(Sounds):
Sound = Sounds[Num - 1] Sound = Sounds[Num - 1]
elif message[1] and message[1][0].isdigit(): #first character is digit, so its not pitch or tempo 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.
searching = message[1].startswith('?') searching = message[1].startswith('?')
search = message[1][1:] if searching else message[1].split(" ")[0] search = message[1][1:] if searching else message[1].split(" ")[0]
Sound = None Sound = None