検証環境
OS X 10.9.5
Hubot 2.9.3
状態
以下のようにbotスクリプトを作成して、Hubotを起動すると件のメッセージが出力される。
example.coffee
module.exports = (robot) ->
robot.respond /abc/i, (msg) ->
msg.send 'xyz'
$ bin/hubot
...
[Mon Nov 17 2014 18:50:47 GMT+0900 (JST)] INFO /Users/stupiddog/hubot/example/scripts/example.coffee is using deprecated documentation syntax
...
Hubot>
対応
ヘッダーコメントを追加して、commands セクションに使い方の説明を追加する。
example.coffee
# Commands:
# hubot abc - Returns the message 'xyz'
#
module.exports = (robot) ->
robot.respond /abc/i, (msg) ->
msg.send 'xyz'
理由
Hubotはhelpコマンドで表示する情報をコメントから得ている。
このため、コメントにCommandsセクションが無い場合に「そのドキュメントの書き方は推奨しませんよ」ってメッセージが出力される。
公式ドキュメントのScripting - Documenting Scriptsに詳しい説明がある。
example.coffee
# Commands:
# hubot abc - Return a message "xyz"
#
module.exports = (robot) ->
robot.respond /abc/i, (msg) ->
msg.send 'xyz'
$ bin/hubot
...
Hubot> hubot help
Hubot> Hubot abc - Return a message "xyz"
Hubot help - Displays all of the help commands that Hubot knows about.
Hubot help <query> - Displays all help commands that match <query>.
Hubot>
...
おまけ
色々試してみたら、"hubot 〜"の行だけでもhelpコマンドに抽出される。
Commandsセクションを記述した場合は、それ以降の"hubot 〜"行が対象になる。
しかし、ひな形にヘッダーコメントも含まれているので横着しないで合わせる方がいいですな。