2012-05-25 2 views

답변

7

Hubot의 Robot 클래스는 어떤 사용자가 입력하거나 방을 떠날 때 당신이주는 콜백을 발광하는 기능 enterleave 있습니다. 그 콜백은 유형이 Message이고, 차례로 user 유형이 UserResponse을 사용합니다.

module.exports = (robot) -> 
    robot.enter (response) -> 
    # at this point you can get the user's name with: 
    # response.message.user.name 
    # works the same for robot.leave 

그러나, hubot에 대한 IRC 어댑터가 현재 그 기능이 작동하도록하는 데 필요한 메시지를 발생하지 않습니다 it appears있다.

+0

안녕하세요 John! 답변 해 주셔서 감사합니다. – Eax

+1

나중에 참조 할 수 있도록 Robot 및 다른 클래스에서 수행 할 수있는 작업에 대한 설명서는 찾을 수 없지만 [hubot repo의 코드 문서] (https://github.com/github/hubot/)를 참조하십시오. tree/master/src) ... 존재합니다. –

관련 문제