SamSwift commited on
Commit
94c0b94
·
1 Parent(s): 35b78a9

Update script.py

Browse files
Files changed (1) hide show
  1. script.py +6 -6
script.py CHANGED
@@ -5,11 +5,11 @@ def activate_hausa(command):
5
  try:
6
  if ('kan' in command and 'fallo' in command.split()) or ('kan' in command and 'falo' in command.split()) or ('kan' in command and 'ballo' in command.split()):
7
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=0')
8
- return "Ok, i'm turning on the parlor light"
9
 
10
  elif ('kashi' in command and 'fallo' in command.split()) or ('ka shi' in command and 'fallo' in command.split()) or ('ka shi' in command and 'balo' in command.split()) or ('kashi' in command and 'falo' in command.split()) or ('ka shi' in command and 'falo' in command.split()) or ('ka she' in command and 'balo' in command.spilt()) or ('ka she' in command and 'ballo' in command.spilt()):
11
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=1')
12
- return "Ok, i'm turning off the parlor light"
13
  else:
14
  return "Couldn't quite understand that, try again"
15
  except (TypeError, AttributeError) as e:
@@ -20,10 +20,10 @@ def activate_english(command):
20
  try:
21
  if command == 'turn off parlor light':
22
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=0')
23
- return "Ok, i'm turning on the parlor light"
24
  elif command == 'turn on parlor light':
25
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=1')
26
- return "Ok, i'm turning off the parlor light"
27
  else:
28
  return "Couldn't quite understand that, try again"
29
  except NoneType as e:
@@ -34,11 +34,11 @@ def activate_yoruba(command):
34
  try:
35
  if ('tan' in command and 'pá lọ̀' in command.split()) or ('tọ' in command and 'pa lọ̀' in command.split()) or ('tán' in command and 'pá lọ' in command.split()) or ('tọ́' in command and 'pá lọ' in command.split()):
36
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=0')
37
- return "Ok!, i'm turning on the parlor light"
38
 
39
  elif ('pá' in command and 'pá lọ' in command.split()) or ('pa' in command and 'pa lọ' in command.split()) or ('pa' in command and 'pà lọ' in command.split()) or ('pà' in command and 'pà lọ' in command.split()) or ('ka shi' in command and 'falo' in command.split()) or ('ka she' in command and 'balo' in command.spilt()) or ('ka she' in command and 'ballo' in command.spilt()):
40
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=1')
41
- return "Ok!, i'm turning off the parlor light"
42
  else:
43
  return "Couldn't quite understand that, try again"
44
  except (TypeError, AttributeError) as e:
 
5
  try:
6
  if ('kan' in command and 'fallo' in command.split()) or ('kan' in command and 'falo' in command.split()) or ('kan' in command and 'ballo' in command.split()):
7
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=0')
8
+ return "Ok, I'm turning on the parlor light"
9
 
10
  elif ('kashi' in command and 'fallo' in command.split()) or ('ka shi' in command and 'fallo' in command.split()) or ('ka shi' in command and 'balo' in command.split()) or ('kashi' in command and 'falo' in command.split()) or ('ka shi' in command and 'falo' in command.split()) or ('ka she' in command and 'balo' in command.spilt()) or ('ka she' in command and 'ballo' in command.spilt()):
11
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=1')
12
+ return "Ok, I'm turning off the parlor light"
13
  else:
14
  return "Couldn't quite understand that, try again"
15
  except (TypeError, AttributeError) as e:
 
20
  try:
21
  if command == 'turn off parlor light':
22
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=0')
23
+ return "Ok, I'm turning on the parlor light"
24
  elif command == 'turn on parlor light':
25
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=1')
26
+ return "Ok, I'm turning off the parlor light"
27
  else:
28
  return "Couldn't quite understand that, try again"
29
  except NoneType as e:
 
34
  try:
35
  if ('tan' in command and 'pá lọ̀' in command.split()) or ('tọ' in command and 'pa lọ̀' in command.split()) or ('tán' in command and 'pá lọ' in command.split()) or ('tọ́' in command and 'pá lọ' in command.split()):
36
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=0')
37
+ return "Ok!, I'm turning on the parlor light"
38
 
39
  elif ('pá' in command and 'pá lọ' in command.split()) or ('pa' in command and 'pa lọ' in command.split()) or ('pa' in command and 'pà lọ' in command.split()) or ('pà' in command and 'pà lọ' in command.split()) or ('ka shi' in command and 'falo' in command.split()) or ('ka she' in command and 'balo' in command.spilt()) or ('ka she' in command and 'ballo' in command.spilt()):
40
  requests.get('https://blynk.cloud/external/api/update?token=G8ynpU1qu1pivhBZuJwaI542ijnLAOsv&v0=1')
41
+ return "Ok!, I'm turning off the parlor light"
42
  else:
43
  return "Couldn't quite understand that, try again"
44
  except (TypeError, AttributeError) as e: