

def dispatch(self):
    "Dispatch http request to registerd commands.\n        Example::\n\n            slack = Slack(app)\n            app.add_url_rule('/', view_func=slack.dispatch)\n        "
    from flask import request
    method = request.method
    data = request.args
    if (method == 'POST'):
        data = request.form
    token = data.get('token')
    team_id = data.get('team_id')
    command = (data.get('command') or data.get('trigger_word'))
    if isinstance(command, string_types):
        command = command.strip().lstrip('/')
    try:
        self.validate(_, token, team_id, method)
    except SlackError as e:
        return self.response(e.msg)
    (func, _, _, kwargs) = self._commands[(team_id, command)]
    kwargs.update(data.to_dict())
    return func(**kwargs)

dataset/ETHPy150Open VeryCB/flask-slack/flask_slack/slack.py Slack.dispatch/VarMisuse@113/188 `command`->`_`