更新ZeroBot至git版本,升级go到1.20#33
Open
RikaCelery wants to merge 3 commits into
Open
Conversation
logrus => 1.9.3 gjson => 1.17.3 [new]: golang.org/x/net v0.21.0 ZeroBot => git
RikaCelery
commented
Feb 9, 2025
| // 添加前置Pre Hook | ||
| m.engine.UsePreHandler(rules.SkipGuildMessage) // TODO 暂时忽略所有频道消息,原因:ZeroBot无法正常发送频道消息 | ||
| m.engine.UsePreHandler(m.preHandlerWithHook) | ||
| m.engine.UseMidHandler(m.preHandlerWithHook) |
Contributor
Author
There was a problem hiding this comment.
这里ZeroBot更改了PreHandler的定义,PreHandler会在Rule匹配之前被调用
而MidHandler会在Rule之后被调用,符合原本的效果
Contributor
Author
|
升级go主要是ZeroBot那边需要go 1.20 |
RikaCelery
commented
Feb 10, 2025
| @@ -257,33 +256,30 @@ func GetBotNickname() string { | |||
|
|
|||
| // GetBotID 获取机器人的登录ID | |||
| func GetBotID() int64 { | |||
Contributor
Author
There was a problem hiding this comment.
多Bot情况无法处理,删除这个API?
| NickName: []string{viper.GetString("nickname")}, | ||
| CommandPrefix: "", | ||
| SuperUsers: viper.GetStringSlice("superuser"), | ||
| CommandPrefix: viper.GetString("command_prefix"), |
Contributor
Author
There was a problem hiding this comment.
这里添加了一个新的配置项command_prefix
Draft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
go => 1.20
logrus => 1.9.3
gjson => 1.17.3
[new]: golang.org/x/net v0.21.0
ZeroBot => git