def stop(opts, bot, event):
    """Usage: stop [--name=<name>] [--notify=<slack_username>]

    Stop a timer.

    _name_ works the same as for `start`.
    If given _slack_username_, reply with an at-mention to the given user.
    """

    name = opts['--name']
    slack_username = opts['--notify']

    now = datetime.datetime.now()
    delta = now - bot.timers.pop(name)

    response = bot.stop_fmt.format(delta)

    if slack_username:
        mention = ''

        # The slack api (provided by https://github.com/os/slacker) is available on all bots.
        users = bot.slack.users.list().body['members']
        for user in users:
            if user['name'] == slack_username:
                mention = "<@%s>" % user['id']
                break
        response = "%s: %s" % (mention, response)

    return response
Usage: stop [--name=<name>] [--notify=<slack_username>]

    Stop a timer.

    _name_ works the same as for `start`.
    If given _slack_username_, reply with an at-mention to the given user.