这看起来确实是个 bug。从我在代码中看到的情况来看,onebox 教程实际上只接受这 3 个特定的链接,因此它的说明完全是错误的。代码中甚至对此有所提及:
# 注意:如果用户更改了 discourse_narrative_bot.new_user_narrative.onebox.instructions 的网站文本,
# 或者用户粘贴了其他随机链接,这可能会变得有点脆弱,但我们目前接受这种风险。
found_link =
@post.raw.match(
%r{https://en\.wikipedia\.org/wiki/(Inherently_funny_word|Death_by_coconut|Calculator_spelling)},
)
我知道我们并没有真正计划在 Discobot 教程上投入更多精力,但这仍然让人不太舒服。我们该怎么办 @martin ?我们至少能否将 Exotic_Shorthair 链接添加到正则表达式中,以便至少让回退机制重新生效?
(不过无论如何,我会将此标记为 bug。)