Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

收发消息时自动转换换行符为\n #36

Closed
undefined-moe opened this issue Apr 15, 2020 · 7 comments
Closed

收发消息时自动转换换行符为\n #36

undefined-moe opened this issue Apr 15, 2020 · 7 comments
Labels

Comments

@undefined-moe
Copy link
Member

No description provided.

@shigma
Copy link
Member

shigma commented Apr 18, 2020

能具体描述一下你的问题吗?

@undefined-moe
Copy link
Member Author

仅个人建议。 发送\n应该自动转换为\r\n

@shigma
Copy link
Member

shigma commented Apr 18, 2020

@masnn 这么做有什么具体的意义吗?

@undefined-moe
Copy link
Member Author

不知道,但是觉得可以统一一下,因为用户发\n一定是想发回车的...

@undefined-moe
Copy link
Member Author

还有就是建议预处理过程中将消息解析为mirai那种messageChain格式,然后把< >这种转义回去,个人认为比CQ码的设计好

@shigma
Copy link
Member

shigma commented Apr 19, 2020

不知道,但是觉得可以统一一下,因为用户发\n一定是想发回车的...

我觉得这个不是系统应该实现的工作,可以有很简单的三行插件来实现这个转化。

@shigma
Copy link
Member

shigma commented Apr 19, 2020

还有就是建议预处理过程中将消息解析为mirai那种messageChain格式,然后把< >这种转义回去,个人认为比CQ码的设计好

在实现一种通用的机制之前一切当然得按照 CQ 来。用着 CQHTTP 的 SDK 却使用 mirai 的语法是很奇怪的。如果要实现 mirai 适配那就是另一件 issue 的事情了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants