def in_reminder(client, channel, nick, args):
global _scheduled<EOL>amount, quantity = int(args[<NUM_LIT:0>][:-<NUM_LIT:1>]), args[<NUM_LIT:0>][-<NUM_LIT:1>]<EOL>if args[<NUM_LIT:1>] == '<STR_LIT>':<EOL><INDENT>target_channel = args[<NUM_LIT:2>]<EOL>message = '<STR_LIT:U+0020>'.join(args[<NUM_LIT:3>:])<EOL>if not target_channel.startswith('<STR_LIT:#>'):<EOL><INDENT>target_channel = '<STR_LIT>'.format(target_channel)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>target_channel = channel<EOL>message = '<STR_LIT:U+0020>'.join(args[<NUM_LIT:1>:])<EOL><DEDENT>if quantity not in in_seconds_map:<EOL><INDENT>return u"<STR_LIT>".format(args[<NUM_LIT:0>])<EOL><DEDENT>seconds = amount * in_seconds_map[quantity]<EOL>utcnow = datetime.datetime.utcnow().replace(tzinfo=pytz.UTC)<EOL>delta = datetime.timedelta(seconds=seconds)<EOL>id = db.reminders.insert({<EOL>'<STR_LIT>': utcnow + delta,<EOL>'<STR_LIT:message>': message,<EOL>'<STR_LIT>': target_channel,<EOL>'<STR_LIT>': nick,<EOL>})<EOL>_scheduled.add(id)<EOL>reactor.callLater(seconds, _do_reminder, id, client)<EOL>return u'<STR_LIT>'.format(readable_time_delta(seconds))<EOL>
Create a one-time reminder to occur at some amount of minutes, hours, or days
in the future. This is used like:

    <sduncan> helga in 12h submit timesheet

This will create a reminder 12 hours from now with the message "submit timesheet".

Optionally, a specific channel can be specified to receive the reminder message. This
is useful if creating several reminders via a private message. To use this, specify
"on <channel>" between the time amount and the message:

    <sduncan> helga in 12h on #bots submit timesheet
    <sduncan> helga in 12h on bots submit timesheet

Note that the '#' char for specifying the channel is entirely optional.