1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 19:43:49 +08:00

fix: examine errors that have been ignored in the 'CQ:at' parser (#1363)

#1332
This commit is contained in:
千橘 雫霞 2022-02-09 23:55:39 +08:00 committed by GitHub
parent 1a78a4809a
commit 115a5f1da7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -954,7 +954,10 @@ func (bot *CQBot) ToElement(t string, d map[string]string, sourceType MessageSou
if qq == "all" { if qq == "all" {
return message.AtAll(), nil 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"]) name := strings.TrimSpace(d["name"])
if len(name) > 0 { if len(name) > 0 {
name = "@" + name name = "@" + name