mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
🐛 Fix manage permission
This commit is contained in:
parent
007742fb65
commit
dbf8aa27f2
@ -20,7 +20,7 @@ func (manage) GetPluginInfo() zero.PluginInfo { // 返回插件信息
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (manage) Start() { // 插件主体
|
func (manage) Start() { // 插件主体
|
||||||
promoteManager := zero.OnRegex("^升为管理.*?(\\d+)", zero.OnlyGroup, zero.AdminPermission).
|
promoteManager := zero.OnRegex("^升为管理.*?(\\d+)", zero.OnlyGroup, zero.SuperUserPermission).
|
||||||
Handle(
|
Handle(
|
||||||
func(matcher *zero.Matcher, event zero.Event, state zero.State) zero.Response {
|
func(matcher *zero.Matcher, event zero.Event, state zero.State) zero.Response {
|
||||||
zero.SetGroupAdmin(event.GroupID, GetInt(state, 1), true)
|
zero.SetGroupAdmin(event.GroupID, GetInt(state, 1), true)
|
||||||
@ -32,7 +32,7 @@ func (manage) Start() { // 插件主体
|
|||||||
promoteManager.Priority = 20
|
promoteManager.Priority = 20
|
||||||
promoteManager.Block = true
|
promoteManager.Block = true
|
||||||
|
|
||||||
cancleManager := zero.OnRegex("^取消管理.*?(\\d+)", zero.OnlyGroup, zero.AdminPermission).
|
cancleManager := zero.OnRegex("^取消管理.*?(\\d+)", zero.OnlyGroup, zero.SuperUserPermission).
|
||||||
Handle(
|
Handle(
|
||||||
func(matcher *zero.Matcher, event zero.Event, state zero.State) zero.Response {
|
func(matcher *zero.Matcher, event zero.Event, state zero.State) zero.Response {
|
||||||
zero.SetGroupAdmin(event.GroupID, GetInt(state, 1), false)
|
zero.SetGroupAdmin(event.GroupID, GetInt(state, 1), false)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user