Changed JSON path
This commit is contained in:
parent
04b4f0ec01
commit
310c9ed759
@ -104,8 +104,8 @@ def format_response(event):
|
|||||||
text = 'Thanks for adding me to a DM, {}!'.format(sender_name)
|
text = 'Thanks for adding me to a DM, {}!'.format(sender_name)
|
||||||
|
|
||||||
elif event_type == 'MESSAGE':
|
elif event_type == 'MESSAGE':
|
||||||
if event['slashCommand']:
|
if event['space'].get('slashCommand'):
|
||||||
text = f"You used a slash command with ID {event['slashCommand']['commandId']}"
|
text = f"You used a slash command with ID {event['space']['slashCommand']['commandId']}"
|
||||||
else:
|
else:
|
||||||
text = 'Your message, {}: "{}"'.format(sender_name, event['message']['text'])
|
text = 'Your message, {}: "{}"'.format(sender_name, event['message']['text'])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user