diff --git a/gensokyo.db b/gensokyo.db deleted file mode 100644 index 602ebfc1..00000000 Binary files a/gensokyo.db and /dev/null differ diff --git a/handlers/send_guild_channel_msg.go b/handlers/send_guild_channel_msg.go index 0a9d5506..81fd01e5 100644 --- a/handlers/send_guild_channel_msg.go +++ b/handlers/send_guild_channel_msg.go @@ -61,7 +61,7 @@ func handleSendGuildChannelMsg(client callapi.Client, api openapi.OpenAPI, apiv2 // 如果messageID为空,通过函数获取 if messageID == "" { messageID = GetMessageIDByUseridOrGroupid(config.GetAppIDStr(), channelID) - log.Println("通过GetMessageIDByUserid函数获取的message_id:", messageID) + log.Println("通过GetMessageIDByUseridOrGroupid函数获取的message_id:", messageID) } log.Println("频道发信息messageText:", messageText) log.Println("foundItems:", foundItems) diff --git a/handlers/send_msg.go b/handlers/send_msg.go index c4db671f..bbb2ed31 100644 --- a/handlers/send_msg.go +++ b/handlers/send_msg.go @@ -235,7 +235,11 @@ func GetMessageIDByUseridOrGroupid(appID string, userID interface{}) string { // 可能需要处理其他类型或报错 return "" } - - key := appID + "_" + userIDStr + //将真实id转为int + userid64, err := idmap.StoreIDv2(userIDStr) + if err != nil { + log.Fatalf("Error storing ID 241: %v", err) + } + key := appID + "_" + fmt.Sprint(userid64) return echo.GetMsgIDByKey(key) }