Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @application.route('/', methods=['GET', 'POST'])
- def hello_world():
- toReturn = ''
- if (request.form.get('command')) == '/ask':
- sc.api_call(
- "dialog.open",
- trigger_id=request.form.get('trigger_id'),
- dialog=question_dialog
- )
- elif (request.form.get('command')) == '/random-groups':
- init()
- else:
- toReturn = 'huh'
- dictionary = {
- 'text': toReturn
- }
- response = application.response_class(
- response=json.dumps(dictionary),
- status=200,
- mimetype='application/json',
- )
- return response
Add Comment
Please, Sign In to add comment