Shortcode: ^reminder(name, script, time)

Set up a one-time notification to the user some time in the future.

Parameter Sample Value Description
name wakeup_call Required. A unique snake_case name for the specific reminder you'd like to create.
script "Hi, <get _userFirstName>, it's time to wake up!" Required. Contents of the reminder. Treat this like a regular bot response and use all the shortcodes or rivescript you need.
time 1483246800000 Required. Milliseconds since the unix epoch. See details on how to generate this.

Example Usage

> object getTime javascript
  return moment().add(Number(args[0]), 'minutes').valueOf();
< object
 
+ wake me up in * minutes
- ^reminder(wakeup_call, "Hi, <get _userFirstName>, it's time to wake up!", <call>getTime <star></call>) OK!
 
+ im already awake
- ^reminderCancel(wakeup_call) OK, we've cancelled that reminder for you.

Details

Names

The "name" parameter will accept any string you give it, but it gets turned into snakecase internally, meaning "WakeUp Call", "wake-up call", and "wake up call" end up all being the same: "wakeup_call". Having a unique name is important, as it's what lets you cancel reminders for your users.

Times

You have access to the MomentJS library inside your macros, which gives you some powerful tools for generating dates. Here's a sample macro that you can use in a variety of situations:

> object relativeTime javascript
  var value = args[0]; // Should be a number
  var interval = args[0]; // See moment.add for values
  return moment().add(value, interval).valueOf();
< object
 
+ remind me in * *
- ^reminder(basic_reminder, "Hey, this is a reminder", <call>relativeTime <star1> <star2></call> Ok, you'll get a reminder in <star1> <star2>
 
+ remind me in *
- ^reminder(basic_reminder, "Hey, this is a reminder", <call>relativeTime <star1> minutes</call> Ok, you'll get a reminder in <star> minutes

Managing reminders