Merge pull request #2 from ZeusWPI/ephemeralephemeral
Made /door ephemeral
This commit is contained in:
commit
e8c86b5a5e
1 changed files with 3 additions and 3 deletions
|
@ -70,8 +70,8 @@ def requires_token(token_name):
|
||||||
return decorator
|
return decorator
|
||||||
|
|
||||||
|
|
||||||
def mattermost_response(message):
|
def mattermost_response(message, ephemeral=False):
|
||||||
response_dict = {"response_type": response_setting,
|
response_dict = {"response_type": "ephemeral" if ephemeral else "in_channel",
|
||||||
"text": message}
|
"text": message}
|
||||||
return Response(json.dumps(response_dict), mimetype="application/json")
|
return Response(json.dumps(response_dict), mimetype="application/json")
|
||||||
|
|
||||||
|
@ -127,4 +127,4 @@ def slotmachien_request(username, command):
|
||||||
def door(username):
|
def door(username):
|
||||||
tokens = request.values.get('text').strip().split()
|
tokens = request.values.get('text').strip().split()
|
||||||
command = tokens[0].lower()
|
command = tokens[0].lower()
|
||||||
return mattermost_response(slotmachien_request(username, command))
|
return mattermost_response(slotmachien_request(username, command), ephemeral=True)
|
||||||
|
|
Loading…
Reference in a new issue