       robot.brain.data.goals[user].achieved_goals = []
 
     goals = data.goals or []
-    dialog.set "goals", goals
+    robot.emit "dialogue:set", msg.envelope.user, "goals", goals
     msg.send "#{msg.envelope.user.name}さんの今日の目標を教えてください！\n" +
       "なければ、「ない」とか「終わり」とか言ってくださいね。"
-
-    #Dialog.addDialog dialog
-    Dialog.listen robot
 
   setAGoal = (msg) ->
     goal = msg.match[1]


    unless data and data.goals.length > 0 and
        moment(data.expiration).isAfter moment()
      msg.send "#{user}さんの今日の目標は設定されておりません。\n" +
        goalsToString [], data.achieved_goals
      return

    goals = data.goals or []

        res = ""
        for goal in achieved_goals
          res += "「#{goal}」を達成したのですね！\n"
          robot.brain.data.goals[@username].achieved += 1

          robot.brain.data.goals[@username].goals =
            _.without robot.brain.data.goals[@username].goals, goal
          robot.brain.data.goals[@username].achieved_goals.push goal

        @respond res

        if robot.brain.data.goals[@username].goals.length > 0
          @respond "続けて達成した目標はありますか？ [番号/ない]\n" +
            goalsToString robot.brain.data.goals[@username].goals
        else
          @respond "全ての目標を達成したようです！\n" +
            msg.random congraturations
          @.end()
      else if /^((もう)?ない|(終|お)わり|おしまい|none|nothing|done|finish|end)$/i.test text
        @respond "お疲れ様でした。"
        @.end()

    Dialog.listen robot
