Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ def eval(cmd, input=None):
return shuttle.eval(cmd['args'])
elif cmd['service'] == 'W': ## Weather
return weather.eval(input)
elif cmd['service'] == 'M': ## Menu
return menu.eval(input)
else:
return "ERROR 42: service not recognized"

## list of services that need the user's input to work, not a command
def needsInput(cmd):
return cmd['service'] in ['W']
if cmd['service'] in ['W']:
return True
return cmd['service'] in ['M']

def special(incoming):
body = ''
Expand All @@ -45,6 +49,7 @@ def special(incoming):
body += 'Sending part of a name gives all information associated with that name.\n'
body += 'For example sending Quad will give information about the shuttle stop Quad and the shuttle'
body += 'route Quad Yard Express and sending Quincy laundry will give all the laundry rooms in Quincy.\n'
# Don't need a special for menu because just the word is a valid option (returns the current day's lunch menu)
return body

## main function
Expand Down
Loading