Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
现在这个分支其实根本没办法正常使用吧(
于是我做了点小工作,让所有功能能够正常使用。
首先要说的一点是,不要再用CQ码发消息了!!!
在接收消息时用CQ码去做正则匹配是没问题的,直接发CQ码的话首先nonebot和gocq官方都不推荐这种方式,
其次有被注入的风险,再说了写起来也没MessageSegment
方便吧(于是我把发消息的地方全都改成构造
MessageSegment
的方式了(有个地方甚至神奇地直接构造Message
然后往里面塞了个CQ码,叹为观止.jpg)然后就是计划任务里面,获取
Bot
对象为啥不用get_bot
我有点看不懂,在我看来就属于搁这搁这呢(而且也没写对啊x还有就是获取命令参数那里写的也太扭曲了,看的血压飙升(小声bb)