Skip to content

Instantly share code, notes, and snippets.

@chloegrace94
Created October 2, 2018 15:23
Show Gist options
  • Save chloegrace94/aa6392ec9ed27670c82c3fde064269d2 to your computer and use it in GitHub Desktop.
Save chloegrace94/aa6392ec9ed27670c82c3fde064269d2 to your computer and use it in GitHub Desktop.
Reserve instance - Slack message with status update attachment
elif action_type == "select":
if action_value == '1':
message_response = ":money_with_wings: Reserving *" + str(instance_name) + "* for *" + action_value + "* day..."
else:
message_response = ":money_with_wings: Reserving *" + str(instance_name) + "* for *" + action_value + "* days..."
message_update = {
"channel":channel_id,
"ts":message_ts,
"text":original_message,
#"attachment_type": "default",
"attachments": [
{
"name": "action_decision",
"text": message_response,
"fallback": ":x: Sorry, I'm unable to do that for you at the moment"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment