LoginSignup
0
0

More than 5 years have passed since last update.

hubot-ircを使ってchannel topicを取得する

Posted at

例えば

test.coffee
robot.hear /(\ topic|^topic)$/i, (msg) ->
   room = msg.envelope.room
   msg.send robot.adapter.bot.chans[room].topic

ただ、入室時に取得したtopicから更新されないようなので、以下を追加した。良い方法はないかな。

node_modules/hubot-irc/src/irc.coffee
bot.addListener 'topic', (channel, topic, nick) ->
   bot.chans[channel].topic = topic
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0