

def response(self, text, response_type='ephemeral', attachments=None):
    'Return a response with json format\n\n        :param text: the text returned to the client\n        :param response_type: optional. When `in_channel` is assigned,\n                              both the response message and the initial\n                              message typed by the user will be shared\n                              in the channel.\n                              When `ephemeral` is assigned, the response\n                              message will be visible only to the user\n                              that issued the command.\n        :param attachments: optional. A list of additional messages\n                            for rich response.\n        '
    from flask import jsonify
    if (attachments is None):
        attachments = []
    data = {
        'response_type': response_type,
        'text': text,
        'attachments': attachments,
    }
    return jsonify(**data)

dataset/ETHPy150Open VeryCB/flask-slack/flask_slack/slack.py Slack.response/original