Skip to content

Commit

Permalink
✏️ 修复 control 找不到服务时 panic (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Nov 26, 2021
1 parent f8ca935 commit d8a41a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions control/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand All @@ -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))
Expand Down

0 comments on commit d8a41a5

Please sign in to comment.