修复 FullMatchRule 中调用 ctx.NickName() 的 panic 问题#902
Merged
fumiama merged 1 commit intoFloatTech:masterfrom May 10, 2024
Kittengarten:master
Merged
修复 FullMatchRule 中调用 ctx.NickName() 的 panic 问题#902fumiama merged 1 commit intoFloatTech:masterfrom Kittengarten:master
fumiama merged 1 commit intoFloatTech:masterfrom
Kittengarten:master
Conversation
fumiama
approved these changes
May 10, 2024
YumeMichi
added a commit
to YumeMichi/ZeroBot-Plugin
that referenced
this pull request
May 15, 2024
* https://github.com/FloatTech/ZeroBot-Plugin: feat: add plugin 抽扑克牌 (FloatTech#906) fix(workflow): pr not work properly Revert "feat: add plugin 抽扑克! (FloatTech#903)" (FloatTech#905) feat: add plugin 抽扑克! (FloatTech#903) [dish] fix: 关键词搜寻功能 (FloatTech#904) 修复 FullMatchRule 中调用 ctx.NickName() 的 panic 问题 (FloatTech#902) optimize: gif plugin for image cache (FloatTech#901) (fix FloatTech#900) Update guessmusic plugin (FloatTech#898) make lint happy add robbery plugin (FloatTech#893) [mcfish] Add one click selling (FloatTech#894)
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.
PrefixRule的ctx.State具有"args"键,而FullMatchRule并不具有,879948a 之后,ctx.NickName()调用ctx.State["args"]时访问了不存在的键,引发panic。鉴于
name变量仅用于输出用户的昵称,无需从args/at获取昵称,因此使用能够满足需求的ctx.CardOrNickName(ctx.Event.UserID)来获取用户群昵称或昵称。