Git Product home page Git Product logo

Comments (6)

ilharp avatar ilharp commented on June 20, 2024

人机一体会造成严重的递归问题,Koishi v3 时代有不少使用者因为此问题导致机器人无限发送消息并最终被平台限流。Koishi 目前暂不支持人机一体。

from koishi.

garveen avatar garveen commented on June 20, 2024

问题不是人机一体,而是同一个账号在别的客户端发送的信息无法被koishi处理。即使会产生递归问题,加一个可选择开关也比直接return强,现在的实现导致一些功能从根本上无法实现。

from koishi.

ilharp avatar ilharp commented on June 20, 2024

同一个账号在别的客户端发送的信息无法被koishi处理

「人机一体」的定义就是「同一个账号在别的客户端发送的信息被 Bot 处理」啊。

加开关我觉得是可以的,等等看其他人的意见。不过除了递归问题以外,人机一体还会遇到其他许多问题,例如权限判断和消息统计等等问题。允许人机一体会导致现有的不少插件行为出现变化。

from koishi.

shigma avatar shigma commented on June 20, 2024

现在的实现导致一些功能从根本上无法实现

可以说说你的需求。如果合理的话可以加开关。

from koishi.

garveen avatar garveen commented on June 20, 2024

可以说说你的需求。如果合理的话可以加开关。

需要做消息日志,包括机器人发送的消息也需要存起来,并且日志和实际业务不在同一台机器,不使用同一套代码

from koishi.

shigma avatar shigma commented on June 20, 2024

那你应当使用 message 事件而非 middleware。

middleware 会被截断,就算不考虑是否是自身消息也不应该使用。

  • 我要接收所有消息:on('message')
  • 我要对 部分 消息做处理:middleware

from koishi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.