Guest User

Untitled

a guest
Jul 21st, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. @application.route('/', methods=['GET', 'POST'])
  2. def hello_world():
  3. toReturn = ''
  4. if (request.form.get('command')) == '/ask':
  5. sc.api_call(
  6. "dialog.open",
  7. trigger_id=request.form.get('trigger_id'),
  8. dialog=question_dialog
  9. )
  10. elif (request.form.get('command')) == '/random-groups':
  11. init()
  12. else:
  13. toReturn = 'huh'
  14. dictionary = {
  15. 'text': toReturn
  16. }
  17. response = application.response_class(
  18. response=json.dumps(dictionary),
  19. status=200,
  20. mimetype='application/json',
  21. )
  22. return response
Add Comment
Please, Sign In to add comment