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

fix: 修正使用sn设置插件内名片模板时,名片模板错误和名片超长时显示设置成功但未成功的问题(增加sn命令default分支内的错误处理)。 #1226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Roi-Rio
Copy link

@Roi-Rio Roi-Rio commented Mar 9, 2025

第一次弄,之前把主分支推过来了,后来要修别的时发现不太对劲,就关闭重推了一下。
如题,解决了#1222的问题()
自己测了下应该没啥问题……
然后我发现.nn命令名称超长时也没有报错……以后再说。

图片

return false
} else if err != nil {
ctx.Player.AutoSetNameTemplate = last
ReplyToSender(ctx, msg, fmt.Sprintf("%q模板sn格式错误,已自动还原之前模板", val))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的提示感觉可以改成命名模版错误或不存在,请使用.sn help查看使用说明

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该是插件模板内设置错误,感觉用.sn help也看不出什么原因?
我比较想写%q模板格式错误或不存在,请更改插件模板设置,但是不知道是否能概括全部情况?请指点,谢谢

ok = true
return false
} else if err != nil {
ctx.Player.AutoSetNameTemplate = last
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里再次设置是否有必要?在前面代码处理的过程中似乎并没有更改AutoSetTemplate

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看上面expr里面有就搬下来的,看起来确实没有更改,之后删除

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

Successfully merging this pull request may close these issues.

2 participants