Reply bot for Discourse?

Has anyone built a bot like thing that can reply to posts if specific conditions are met (e.g. "topic in category foo, does not contain string bar)?

I have quite a few “issue” type topics in the developer community I am moderating, and 75% of my replies are just asking for software and environment information. It would be great if I could have a bot version of myself that could check with some simple rules and then create a reply to the topic if they are not met.

1 个赞

Use a post template for the category?

I know it is frustrating, especially when using Discourse as a technical support forum. There are standard questions you need to ask e.g. serial number, model number, product series etc. that 90% of the posters don’t care to provide.

Maybe also consider the “Canned Answer” plugin.

1 个赞

Post template doesn’t work as only ~75% of the posts need that information :confused:
Also having one makes 50% of all posts have parts of the template (not filled out) inside them :frowning:

“Canned Replies” plugin is in use, still have to 1) read the post and 2) do the mental decision then 3) click the cog 4) click the Canned Replies 5) click the search box 6) type the name of the reply I need 7) click the insert icon 8) click the “Reply” button. That gets old really fast unfortunately (which means after at least 30 minutes of doing this every morning…). :man_shrugging: (Also it is all from my account which is gives me notifications even though I only made them offer the necessary information and didn’t really reply)

But thanks for the suggestions - unfortunately I already tried both :sunny:

If you’re comfortable configuring and self-hosting your own bot software, I wrote a hubot adapter for discourse that may handle your use case.

6 个赞

Not yet, but you have to start somewhere :wink:

Awesome, I don’t know anything about Hubot as well (yet), but that looks like what I was looking for.

2 个赞

Maybe something similar to the Akismet plugin, but only verifies each new post based on whether the required content is there instead of sending the content to Akismet?

首先,这是系统将此帖顶上来的,我并非主动挖掘此帖以提供回复。
其次,我检查了发帖人是否在此网站活跃,发帖人自 19 年 2 月 14 日起就未出现,因此不要指望发帖人会阅读任何回复或为此选择解决方案。


这可能可以通过 Discourse AI - AI Bot 来解决,该机器人仍在开发中。作为早期用户,我正在尝试用它来回复这里的一些实际首帖,看看它的效果如何。虽然 AI Bot 可以给出智能且人类可读的回复,但许多回复并非我所能接受的答案。然而,在其他地方看到此类技术的发展,AI 技术有潜力实现此处所述的目标。

1 个赞

有一个名为“自动回复”的自动化脚本,可以根据帖子中包含的单词/短语发布回复。我不确定,但我想知道这是否可以反转并稍作扩展?:thinking:

我将把它移到 Feature,但这是一个相当旧的功能,所以可能还有其他类似的已整理好的功能请求。

1 个赞

如果您建议增强“自动回复器”以支持人工智能,我完全同意。您应该将其添加为人工智能功能请求,最坏的情况是帖子在那里无所事事。最好的情况是它被实现。

1 个赞

对于有 Ruby 编程经验的人来说,这在技术上很容易。只需编写一个插件,响应 :post_created 事件,然后编写类似以下的代码:

DiscourseEvent.on(:post_created) do |*params|
    post, opt, user = params

    if post.raw.include "foo"
        PostCreator.create!(
             User.find_by(id: bot_id),
             topic_id: post.topic_id,
             raw: "bar",
        )
    end
end
4 个赞