From 115a5f1da75db26e02d5efe346c35f34ddde3aca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=83=E6=A9=98=20=E9=9B=AB=E9=9C=9E?= Date: Wed, 9 Feb 2022 23:55:39 +0800 Subject: [PATCH] fix: examine errors that have been ignored in the 'CQ:at' parser (#1363) #1332 --- coolq/cqcode.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coolq/cqcode.go b/coolq/cqcode.go index 80d5913..7f95b1f 100644 --- a/coolq/cqcode.go +++ b/coolq/cqcode.go @@ -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