discourse-chatbot icon indicating copy to clipboard operation
discourse-chatbot copied to clipboard

make bot respond only when explicitly tagged or chat directly

Open duhd1993 opened this issue 7 months ago • 2 comments

Currently, even if I don’t select any auto-response category, the bot still replies automatically when it’s tagged in the first post. Ideally, I’d prefer it to respond only when it’s explicitly tagged. Is that possible?

Another related issue: is it possible to prevent the bot from responding when tagged in chats with others, while still allowing it to work in direct chat - through the quick access button?

I haven’t found any settings related to this, but I could be mistaken. If you're interested in implementing these features, that would be fantastic. If not, I’ll look into it myself, although I have no experience with Ruby or Discourse customization.

duhd1993 avatar Jun 04 '25 15:06 duhd1993

The bot is deliberately chatty and will auto-respond once invoked until a second human joins the conversation.

This is covered in the docs here: https://meta.discourse.org/t/discourse-chatbot/256652#p-1247153-how-to-get-the-bot-to-respond-13

I don't intend to change this behaviour. I might accept a quality PR with unit tests to add a setting to disable the auto-responding behaviour but be mindful this is absolutely desirable in PMs. I would also consider a contract to implement this.

No, there is current no way to turn off Group Chats, but not one to one PMs. That seems like a reasonable suggestion but one way of taking care of this is simply give untrustworthy users low quotas.

The main issue with these requests is it will add yet more settings and that just increases the complexity of configuration.

merefield avatar Jun 04 '25 18:06 merefield

I might accept the following PR here (or you can hire me to implement)

Introduce new setting “Auto reply up to post count” just on Topics:

  1. Set this to zero, Chatbot never responds without clicked reply or @ mention.
  2. Set this to x:
    • Chatbot will always reply (if previously invoked) if Topic post count <= x and only one human participant (using post count makes this simpler to implement and easier to maintain).
    • Once this reaches x, goes back to behaviour in 1.
  3. Set to 9999999 for pretty much existing behaviour - bot will reply (if previously invoked) until there is more than one human user - then Chatbot never responds without clicked reply or @ mention.

Additionally we can ignore System User in Human Count.

merefield avatar Jun 05 '25 12:06 merefield