def run(parsed): event = {"type": "reminder", "title": parsed['~message']} if '@date' in parsed: event['date'] = parsed['@date']['timestamp'] success = all(create_events([event])) post_notification( "Created reminder" if success else "Failed to create reminder")
def run(parsed): event = { "type": "reminder", "title": parsed['~message'] } if '@date' in parsed: event['date'] = parsed['@date']['timestamp'] success = all(create_events([event])) post_notification("Created reminder" if success else "Failed to create reminder")
def run(*args): event, from_date, to_date, location = args success = all( create_events([{ "type": "event", "title": event, "date": from_date, "endDate": to_date }])) post_notification("Created event" if success else "Failed to create event")
def run(*args): event, from_date, to_date, location = args success = all(create_events([{"type": "event", "title": event, "date": from_date, "endDate": to_date}])) post_notification("Created event" if success else "Failed to create event")