diff --git a/.cpanel.yml b/.cpanel.yml index c18b019..2f8d860 100644 --- a/.cpanel.yml +++ b/.cpanel.yml @@ -2,4 +2,5 @@ deployment: tasks: - export DEPLOYPATH=/home/benjamyntesting/chatbot/ - - cp -Rfv * $DEPLOYPATH \ No newline at end of file + - cp -Rfv * $DEPLOYPATH + - touch $DEPLOYPATH/tmp/restart.txt \ No newline at end of file diff --git a/priceybot2/chatbot.py b/priceybot2/chatbot.py index 4a115a1..2372b4a 100644 --- a/priceybot2/chatbot.py +++ b/priceybot2/chatbot.py @@ -104,7 +104,11 @@ def format_response(event): text = 'Thanks for adding me to a DM, {}!'.format(sender_name) elif event_type == 'MESSAGE': - text = 'Your message, {}: "{}"'.format(sender_name, event['message']['text']) + slash_command = event['message'].get('slashCommand') + if slash_command: + text = f"You used a slash command with ID {slash_command['commandId']}" + else: + text = 'Your message, {}: "{}"'.format(sender_name, event['message']['text']) response = {'text': text} diff --git a/priceybot2/templates/index.html b/priceybot2/templates/index.html index ce45b56..e2e69fa 100644 --- a/priceybot2/templates/index.html +++ b/priceybot2/templates/index.html @@ -2,9 +2,9 @@ {% block content %}