Got the two suggestions from github issues https://github.com/github/hubot/issues/647
[update] this issue is fixed in source code robot.coffee
by adding adapterName
, so you can check robot.adapterName
since version 2.7.2, see changes
sniff, It could be checked with special information in adapter
, and possible checks below for my environment on shell
,xmpp
,irc
robot.respond /adapter$/i, (msg) ->
#console.log "adapter", robot.adapter
if robot.adapter.client?
if robot.adapter.client.preferredSaslMechanism?
msg.send "this is xmpp adapter"
if robot.adapter.bot?
if robot.adapter.bot.opt?
msg.send "this is irc adapter"
#if robot.adapter.bot?
# msg.send "this is campfire ?"
if robot.adapter.repl?
if robot.adapter.repl.terminal?
msg.send "this is shell adapter"
add extra parameter in robot.coffee
, it needs a patch for this, it is inside code see update above
I choose sniff so far