Skip to content

Commit

Permalink
fix: examine errors that have been ignored in the 'CQ:at' parser (#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
qianjunakasumi authored Feb 9, 2022
1 parent 1a78a48 commit 115a5f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion coolq/cqcode.go
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,10 @@ func (bot *CQBot) ToElement(t string, d map[string]string, sourceType MessageSou
if qq == "all" {
return message.AtAll(), nil
}
t, _ := strconv.ParseInt(qq, 10, 64)
t, err := strconv.ParseInt(qq, 10, 64)
if err != nil {
return nil, err
}
name := strings.TrimSpace(d["name"])
if len(name) > 0 {
name = "@" + name
Expand Down

0 comments on commit 115a5f1

Please sign in to comment.