From d836f1673ee2cd5e86835fef137b486247c78c48 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Sat, 7 Nov 2015 12:21:32 -0500 Subject: more goodies --- slack.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'slack.py') diff --git a/slack.py b/slack.py index b7b1852..da0a8b3 100644 --- a/slack.py +++ b/slack.py @@ -4,7 +4,13 @@ app.config.from_envvar('CONF') @app.route("/echo", methods=['POST']) def echo(): - return request.form['text'] + d = {'response_type': 'in_channel', + 'text': "I'm the echo bot!" + 'attachments': [ + {'text':request.form['text']} + ] + } + return jsonify(d) if __name__=="__main__": app.run() -- cgit v1.2.3-70-g09d2