mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
✏️ 修复 control 找不到服务时 panic (#81)
This commit is contained in:
parent
f8ca9355d2
commit
d8a41a5ee1
@ -177,6 +177,7 @@ func init() {
|
||||
service, ok := Lookup(model.Args)
|
||||
if !ok {
|
||||
ctx.SendChain(message.Text("没有找到指定服务!"))
|
||||
return
|
||||
}
|
||||
grp := ctx.Event.GroupID
|
||||
if grp == 0 {
|
||||
@ -201,6 +202,7 @@ func init() {
|
||||
service, ok := Lookup(model.Args)
|
||||
if !ok {
|
||||
ctx.SendChain(message.Text("没有找到指定服务!"))
|
||||
return
|
||||
}
|
||||
grp := ctx.Event.GroupID
|
||||
if grp == 0 {
|
||||
@ -218,6 +220,7 @@ func init() {
|
||||
service, ok := Lookup(model.Args)
|
||||
if !ok {
|
||||
ctx.SendChain(message.Text("没有找到指定服务!"))
|
||||
return
|
||||
}
|
||||
if service.options.Help != "" {
|
||||
ctx.SendChain(message.Text(service.options.Help))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user