# Hubot Adapter for Discourse

**URL:** <https://meta.discourse.org/t/hubot-adapter-for-discourse/63419>\
**Category:** Extras\
**Created:** [May 26, 2017, 5:03am UTC](https://meta.discourse.org/t/hubot-adapter-for-discourse/63419 "2017-05-26T05:03:55Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![featheredtoast](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/featheredtoast/32/116994_2.png) [@featheredtoast](https://meta.discourse.org/u/featheredtoast)\
**Post date:** [March 6, 2018, 5:51pm UTC](https://meta.discourse.org/t/hubot-adapter-for-discourse/63419/16 "2018-03-06T17:51:00Z")

</div>

So something strange is going on with babble’s handling of replying via the API. Here’s a rundown:

The “emitting robot action” log there is in his script. Hubot adapters work by “hearing” messages that emit messages to a user’s script to handle them (Containing such logic as hearing “hello” I want to reply with “oh hi there”). The script has hooks to “reply” or “respond” again using the adapter’s `say` or `reply` method.

Those methods in my adapter simply hook into the Discourse `posts.json` API endpoint here:

[https://github.com/featheredtoast/hubot-discourse-adapter/blob/master/src/discourse.coffee#L142](https://github.com/featheredtoast/hubot-discourse-adapter/blob/master/src/discourse.coffee#L142)

“reply” uses the `reply_to_post_number` parameter, which works great for standard topics, but appears to not get handled well in Babble land.

---

_[View the full topic](https://meta.discourse.org/t/hubot-adapter-for-discourse/63419)._
