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

白名单运行 #34

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Conversation

RikaCelery
Copy link
Contributor

No description provided.

@RikaCelery
Copy link
Contributor Author

oops

@@ -16,21 +16,29 @@ func SetUserPluginStatus(status bool, userID int64, plugin *manager.PluginCondit
var key string
if plugin != nil {
key = plugin.Key
} else { // plugin 为空,代表所有插件
key = AllPluginKey
Copy link
Contributor Author

@RikaCelery RikaCelery Feb 10, 2025

Choose a reason for hiding this comment

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

看了一下这里没有这种情况出现

// 处理插件名
plugin = findPluginByName(args[0])
if plugin == nil {
ctx.Send(fmt.Sprintf("没有叫%v的功能哦,可以看看帮助", args[0]))
return 0, nil, period, fmt.Errorf("no such plugin %v", args[0])
}

@@ -51,21 +59,29 @@ func SetGroupPluginStatus(status bool, groupID int64, plugin *manager.PluginCond
var key string
if plugin != nil {
key = plugin.Key
} else { // plugin 为空,代表所有插件
key = AllPluginKey
Copy link
Contributor Author

@RikaCelery RikaCelery Feb 10, 2025

Choose a reason for hiding this comment

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

同上,传入参数不可能为nil

// 处理插件名
plugin = findPluginByName(args[0])
if plugin == nil {
ctx.Send(fmt.Sprintf("没有叫%v的功能哦,可以看看帮助", args[0]))
return 0, nil, period, fmt.Errorf("no such plugin %v", args[0])
}

@RikaCelery RikaCelery marked this pull request as draft February 10, 2025 02:52
fix: 切换白名单后所有插件被禁用
@RikaCelery
Copy link
Contributor Author

#33 合了再弄,conflict太多了

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.

1 participant