koishijs / koishi-plugin-adapter-onebot

OneBot 适配器
MIT License
26 stars 10 forks source link

feat: add api send_msg #17

Closed Gordenqiu closed 7 months ago

Gordenqiu commented 7 months ago

希望增加send_msg,实现端有同时传递userid与groupid的需求

Gordenqiu commented 7 months ago
  1. 你没有传递 message_type,会导致无法判断是群聊还是私聊
  2. 任何 send_msg 都可以转化为 send_private_msg 或 send_group_msg 中的一种;而当你传了 message_type 的时候你必然知道这是哪一种(所以没有必要实现这个 API)

抱歉,我漏掉了message_type的传递,我希望有send_msg是因为在我使用的实现端的群聊场景中,有需要同时传递userid与groupid的情况,来区分是否为纯主动消息和被动消息,现有的 send_group_msg无法传递userid,只有send_msg才可以同时传递2者 如果不太合理的话我就不提交了,打扰大佬了

shigma commented 7 months ago

send_msg 是一个非常远古的 API,ob11 保留应该纯粹是兼容性理由。我个人是建议你去看看你的实现侧有没有可能修改到 send_private_msg 或 send_group_msg,如果实在改不了再 reopen 这个 PR,改对依然可以合并。

Gordenqiu commented 7 months ago

send_msg 是一个非常远古的 API,ob11 保留应该纯粹是兼容性理由。我个人是建议你去看看你的实现侧有没有可能修改到 send_private_msg 或 send_group_msg,如果实在改不了再 reopen 这个 PR,改对依然可以合并。

好的,感谢大佬指点~