From fd27d3b72b534318272b25263395951c8917a287 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:20:58 +0800 Subject: [PATCH] fix: examine errors that have been ignored in the 'CQ:at' parser #1332 --- coolq/cqcode.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coolq/cqcode.go b/coolq/cqcode.go index 80d591360..7f95b1fc5 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