From 71109f23fb8af59c3a62697a21ed0c2dedd9ecac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sun, 5 May 2024 02:25:53 +0900 Subject: [PATCH] fix: reply face --- plugin/manager/manager.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/manager/manager.go b/plugin/manager/manager.go index ab328271..60f3b390 100644 --- a/plugin/manager/manager.go +++ b/plugin/manager/manager.go @@ -414,10 +414,10 @@ func init() { // 插件主体 ctx.SendChain(message.Text("ERROR: 表情长度为 0")) return } - ids := facere.FindStringSubmatch(face)[1] + ids := facere.FindStringSubmatch(face) id := rune(0) - if len(ids) > 0 { - idi, err := strconv.Atoi(ids) + if len(ids) == 2 && len(ids[1]) > 0 { + idi, err := strconv.Atoi(ids[1]) if err != nil { ctx.SendChain(message.Text("ERROR: ", err)) return