diff --git a/Backend/main.go b/Backend/main.go deleted file mode 100644 index 034e621..0000000 --- a/Backend/main.go +++ /dev/null @@ -1,223 +0,0 @@ -package backend - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "math" - "net/http" - "os" - "strconv" - "time" - - "github.com/MoYoez/Lucy-QOnebot/plugin/mai" -) - -type UserUpdaterStruct struct { - UserId int `json:"userId"` - UserMusicList []struct { - UserMusicDetailList []struct { - MusicId int `json:"musicId"` - Level int `json:"level"` - PlayCount int `json:"playCount"` - Achievement int `json:"achievement"` - ComboStatus int `json:"comboStatus"` - SyncStatus int `json:"syncStatus"` - DeluxscoreMax int `json:"deluxscoreMax"` - ScoreRank int `json:"scoreRank"` - ExtNum1 int `json:"extNum1"` - ExtNum2 int `json:"extNum2"` - } `json:"userMusicDetailList"` - } `json:"userMusicList"` -} - -type InnerStructChanger struct { - Title string `json:"title"` - Type string `json:"type"` - LevelIndex int `json:"level_index"` - Achievements float64 `json:"achievements"` - Fc string `json:"fc"` - Fs string `json:"fs"` - DxScore int `json:"dxScore"` -} - -type DivingFishMusicDataStruct struct { - Id string `json:"id"` - Title string `json:"title"` - Type string `json:"type"` - Ds []float64 `json:"ds"` - Level []string `json:"level"` - Cids []int `json:"cids"` - Charts []struct { - Notes []int `json:"notes"` - Charter string `json:"charter"` - } `json:"charts"` - BasicInfo struct { - Title string `json:"title"` - Artist string `json:"artist"` - Genre string `json:"genre"` - Bpm int `json:"bpm"` - ReleaseDate string `json:"release_date"` - From string `json:"from"` - IsNew bool `json:"is_new"` - } `json:"basic_info"` -} - -func AliveTest(w http.ResponseWriter, _ *http.Request) { - fmt.Fprint(w, "alive") -} - -func ReturnUserList(w http.ResponseWriter, _ *http.Request) { - fmt.Fprint(w, mai.QueryUserRequiredUpdater()) -} - -func Updater(w http.ResponseWriter, r *http.Request) { - if r.Method != http.MethodPost { - http.Error(w, "METHOD NOT ALLOWED", http.StatusMethodNotAllowed) - return - } - getBody, err := io.ReadAll(r.Body) - if err != nil { - http.Error(w, "Body Data Error, Existed. ", http.StatusInternalServerError) - return - } - var getBodyStruct UserUpdaterStruct - err = json.Unmarshal(getBody, &getBodyStruct) - if err != nil { - http.Error(w, "Body Data Error, Existed. ", http.StatusInternalServerError) - return - } - getUserID := getBodyStruct.UserId - getToken := mai.GetUserToken(strconv.FormatInt(mai.GetUserQQFromDatabase(int64(getUserID)).QQ, 10)) - tokenChecker := mai.CheckTheTicketIsValid(getToken) - if tokenChecker == "" { - getReturnedMsg := map[string]interface{}{ - "status": false, - "message": "Cannot Check UserToken Is Valid, DivingFish Service maybe not work well yet >", - } - getMarshaled, _ := json.Marshal(getReturnedMsg) - http.Error(w, string(getMarshaled), 400) - return - } - if tokenChecker == "non-exist" { - getReturnedMsg := map[string]interface{}{ - "status": false, - "message": "UserToken Is Invalid, no need to try again. ", - } - getMarshaled, _ := json.Marshal(getReturnedMsg) - http.Error(w, string(getMarshaled), 400) - return - } - // Updater. - getFullDataStruct := convert(getBodyStruct) - jsonDumper := getFullDataStruct - jsonDumperFull, err := json.Marshal(jsonDumper) - if err != nil { - getReturnedMsg := map[string]interface{}{ - "status": false, - "message": "SongData Packed Error, Check Valid", - } - getMarshaled, _ := json.Marshal(getReturnedMsg) - http.Error(w, string(getMarshaled), 400) - return - } - // upload to diving fish api - req, err := http.NewRequest("POST", "https://www.diving-fish.com/api/maimaidxprober/player/update_records", bytes.NewBuffer(jsonDumperFull)) - if err != nil { - // Handle error - getReturnedMsg := map[string]interface{}{ - "status": false, - "message": "Upload To divingFish error", - } - getMarshaled, _ := json.Marshal(getReturnedMsg) - http.Error(w, string(getMarshaled), 400) - return - } - req.Header.Set("Import-Token", getToken) - req.Header.Set("Content-Type", "application/json") - client := &http.Client{} - resp, err := client.Do(req) - if err != nil { - panic(err) - } - if resp.StatusCode == 200 || resp.StatusCode == 500 { - getReturnedMsg := map[string]interface{}{ - "status": true, - "message": "Upload Song Successful.", - } - getMarshaled, _ := json.Marshal(getReturnedMsg) - fmt.Fprint(w, string(getMarshaled)) - return - } else { - getReturnedMsg := map[string]interface{}{ - "status": false, - "message": "Upload Falied, return Code: " + strconv.Itoa(resp.StatusCode), - } - getMarshaled, _ := json.Marshal(getReturnedMsg) - http.Error(w, string(getMarshaled), 400) - return - } -} - -func convert(listStruct UserUpdaterStruct) []InnerStructChanger { - dir, _ := os.Getwd() - getRequest, err := os.ReadFile(dir + "/data/maidx/music_data") - if err != nil { - panic(err) - } - var divingfishMusicData []DivingFishMusicDataStruct - err = json.Unmarshal(getRequest, &divingfishMusicData) - if err != nil { - panic(err) - } - mdMap := make(map[string]DivingFishMusicDataStruct) - for _, m := range divingfishMusicData { - mdMap[m.Id] = m - } - var dest []InnerStructChanger - for _, musicList := range listStruct.UserMusicList { - for _, musicDetailedList := range musicList.UserMusicDetailList { - level := musicDetailedList.Level - achievement := math.Min(1010000, float64(musicDetailedList.Achievement)) - fc := []string{"", "fc", "fcp", "ap", "app"}[musicDetailedList.ComboStatus] - fs := []string{"", "fs", "fsp", "fsd", "fsdp"}[musicDetailedList.SyncStatus] - dxScore := musicDetailedList.DeluxscoreMax - dest = append(dest, InnerStructChanger{ - Title: mdMap[strconv.Itoa(musicDetailedList.MusicId)].Title, - Type: mdMap[strconv.Itoa(musicDetailedList.MusicId)].Type, - LevelIndex: level, - Achievements: (achievement) / 10000, - Fc: fc, - Fs: fs, - DxScore: dxScore, - }) - } - } - return dest -} - -func GetNextExecutionTime() time.Time { - now := time.Now() - nextExecutionTime := time.Date(now.Year(), now.Month(), now.Day(), 23, 0, 0, 0, now.Location()) - if nextExecutionTime.Before(now) { - nextExecutionTime = nextExecutionTime.Add(24 * time.Hour) - } - return nextExecutionTime -} - -func SongUpdater() { - mai.UpdaterSongData() -} - -func AuthCode(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - apiKey := r.Header.Get("Authorization") - if apiKey != "Bearer "+os.Getenv("sync") { - http.Error(w, "Unauthorized", http.StatusUnauthorized) - return - } - // Call the next handler - next.ServeHTTP(w, r) - }) -} diff --git a/main.go b/main.go index dbc94e9..faf1cd8 100644 --- a/main.go +++ b/main.go @@ -2,14 +2,11 @@ package main import ( - "fmt" - "net/http" "os" "time" "github.com/joho/godotenv" - backend "github.com/MoYoez/Lucy-QOnebot/Backend" "github.com/MoYoez/Lucy-QOnebot/kanban" // 在最前打印 banner _ "github.com/MoYoez/Lucy-QOnebot/plugin/bottle" // 漂流瓶 _ "github.com/MoYoez/Lucy-QOnebot/plugin/manager" // 群管 @@ -60,14 +57,7 @@ func main() { Handle(func(ctx *zero.Ctx) { ctx.SendChain(message.Text(kanban.Banner)) }) - // USAGE : Lucy's Backend Server - http.Handle("/", backend.AuthCode(http.HandlerFunc(backend.AliveTest))) - http.Handle("/api/cici/queryid", backend.AuthCode(http.HandlerFunc(backend.ReturnUserList))) - http.Handle("/api/cici/updater", backend.AuthCode(http.HandlerFunc(backend.Updater))) - port := 51608 - address := fmt.Sprintf(":%d", port) - go http.ListenAndServe(address, nil) - go zero.RunAndBlock(&zero.Config{ + zero.RunAndBlock(&zero.Config{ NickName: append([]string{os.Getenv("name")}, "Lucy", "lucy", "Lucy酱"), CommandPrefix: "/", SuperUsers: []int64{1292581422}, @@ -75,16 +65,4 @@ func main() { MaxProcessTime: time.Minute * 4, RingLen: 0, }, process.GlobalInitMutex.Unlock) - - fmt.Print("#### RUN SERVER BACKEND\n") - fmt.Printf("Server is running on https://localhost:%d\n", port) - backend.SongUpdater() - timer := time.NewTimer(time.Until(backend.GetNextExecutionTime())) - go func() { - for range timer.C { - backend.SongUpdater() - timer.Reset(time.Until(backend.GetNextExecutionTime())) - } - }() - select {} } diff --git a/plugin/mai/attract.go b/plugin/mai/attract.go deleted file mode 100644 index 0ec3c48..0000000 --- a/plugin/mai/attract.go +++ /dev/null @@ -1,222 +0,0 @@ -package mai - -import ( - "encoding/json" - "fmt" - "github.com/tidwall/gjson" - zero "github.com/wdvxdr1123/ZeroBot" - "github.com/wdvxdr1123/ZeroBot/message" - "math/rand" - "sort" - "strconv" - "time" -) - -type Detail struct { - UserName string `json:"userName"` - PlayerRating int `json:"playerRating"` - TotalAwake int `json:"totalAwake"` -} - -type UserLogin struct { - UserID int `json:"userId"` - ClientID string `json:"clientId"` - LoginTime string `json:"loginTime"` - Detail Detail `json:"detail"` -} - -type ReturnValue struct { - Data map[string][]UserLogin `json:"returnValue"` -} - -var Tips = "\n\n 小提示:当前所在机厅群关联机厅为Lucy加速方案合作机厅,可使用/mai autosync 来启用当前机厅加速盒自动同步成绩w (需绑定水鱼Token)\n" - -func init() { - engine.OnFullMatchGroup([]string{"bbwj", "bbw几"}).SetBlock(true).Handle(func(ctx *zero.Ctx) { - if ctx.Event.GroupID != 686575004 && ctx.Event.GroupID != 621400692 { - return - } - getChecker := CheckerTimeUpper(ctx.MessageString()) - if getChecker != "" { - ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(getChecker)) - return - } - getReturnedData, _ := GetSpecifyAttarct(bbwID) - var returnValue ReturnValue - err := json.Unmarshal([]byte(getReturnedData), &returnValue) - if err != nil { - fmt.Println("Error decoding JSON:", err) - return - } - uniqueMap := make(map[string]bool) - var getExpectList []int - for i := range returnValue.Data { - getInt, err := strconv.Atoi(i) - if err != nil { - panic(err) - } - getExpectList = append(getExpectList, getInt) - } - // sort - sort.Ints(getExpectList) - i := 0 - var returnText string - for range returnValue.Data { - uniqueList := make([]string, 0, len(uniqueMap)) - for _, userlist := range returnValue.Data[strconv.Itoa(getExpectList[i])] { - uniqueMap[strconv.Itoa(userlist.UserID)] = true - } - for key := range uniqueMap { - uniqueList = append(uniqueList, key) - } - getuserListIDListLength := len(uniqueList) - getUserFullPC := len(returnValue.Data[strconv.Itoa(getExpectList[i])]) - getReturnText := PlayReturnText(strconv.Itoa(getExpectList[i]), getuserListIDListLength, getUserFullPC) - returnText = returnText + "\n" + getReturnText - i = i + 1 - } - var checkerUserLogin string - if gjson.Get(getReturnedData, "returnValue.30.0.loginTime").String() != "" { - checkerUserLogin = ReturnNewestUser(returnValue.Data["30"][0]) - } else { - checkerUserLogin = "\n半小时内似乎没有人游玩呢( " - } - ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("* 宝贝王合肥万达广场店的 1 台舞萌 DX:\n"+returnText+checkerUserLogin+Tips)) - }) - - engine.OnFullMatchGroup([]string{"jj", "🐔?", "🐔?", "🐔j", "j几"}).SetBlock(true).Handle(func(ctx *zero.Ctx) { - if ctx.Event.GroupID != 835926174 && ctx.Event.GroupID != 621400692 { - return - } - getChecker := CheckerTimeUpper(ctx.MessageString()) - if getChecker != "" { - ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(getChecker)) - return - } - getReturnedData, _ := GetSpecifyAttarct(jID) - var returnValue ReturnValue - err := json.Unmarshal([]byte(getReturnedData), &returnValue) - if err != nil { - fmt.Println("Error decoding JSON:", err) - return - } - uniqueMap := make(map[string]bool) - var getExpectList []int - for i := range returnValue.Data { - getInt, err := strconv.Atoi(i) - if err != nil { - panic(err) - } - getExpectList = append(getExpectList, getInt) - } - // sort - sort.Ints(getExpectList) - i := 0 - var returnText string - for range returnValue.Data { - uniqueList := make([]string, 0, len(uniqueMap)) - for _, userlist := range returnValue.Data[strconv.Itoa(getExpectList[i])] { - uniqueMap[strconv.Itoa(userlist.UserID)] = true - } - for key := range uniqueMap { - uniqueList = append(uniqueList, key) - } - getuserListIDListLength := len(uniqueList) - getUserFullPC := len(returnValue.Data[strconv.Itoa(getExpectList[i])]) - getReturnText := PlayReturnText(strconv.Itoa(getExpectList[i]), getuserListIDListLength, getUserFullPC) - returnText = returnText + "\n" + getReturnText - i = i + 1 - } - var checkerUserLogin string - if gjson.Get(getReturnedData, "returnValue.30.0.loginTime").String() != "" { - checkerUserLogin = ReturnNewestUser(returnValue.Data["30"][0]) - } else { - checkerUserLogin = "\n半小时内似乎没有人游玩呢( " - } - ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("* 大玩家厦门集美万达店的 1 台舞萌 DX:\n"+returnText+checkerUserLogin+Tips)) - }) - - engine.OnFullMatchGroup([]string{"thjr", "thj", "tj", "jr", "th几"}).SetBlock(true).Handle(func(ctx *zero.Ctx) { - if ctx.Event.GroupID != 1083559712 && ctx.Event.GroupID != 621400692 { - return - } - getChecker := CheckerTimeUpper(ctx.MessageString()) - if getChecker != "" { - ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text(getChecker)) - return - } - getReturnedData, _ := GetSpecifyAttarct(thID) - var returnValue ReturnValue - err := json.Unmarshal([]byte(getReturnedData), &returnValue) - if err != nil { - fmt.Println("Error decoding JSON:", err) - return - } - uniqueMap := make(map[string]bool) - var getExpectList []int - for i := range returnValue.Data { - getInt, err := strconv.Atoi(i) - if err != nil { - panic(err) - } - getExpectList = append(getExpectList, getInt) - } - // sort - sort.Ints(getExpectList) - i := 0 - var returnText string - for range returnValue.Data { - uniqueList := make([]string, 0, len(uniqueMap)) - for _, userlist := range returnValue.Data[strconv.Itoa(getExpectList[i])] { - uniqueMap[strconv.Itoa(userlist.UserID)] = true - } - for key := range uniqueMap { - uniqueList = append(uniqueList, key) - } - getuserListIDListLength := len(uniqueList) - getUserFullPC := len(returnValue.Data[strconv.Itoa(getExpectList[i])]) - getReturnText := PlayReturnText(strconv.Itoa(getExpectList[i]), getuserListIDListLength, getUserFullPC) - returnText = returnText + "\n" + getReturnText - i = i + 1 - } - var checkerUserLogin string - if gjson.Get(getReturnedData, "returnValue.30.0.loginTime").String() != "" { - checkerUserLogin = ReturnNewestUser(returnValue.Data["30"][0]) - } else { - checkerUserLogin = "\n半小时内似乎没有人游玩呢( " - } - ctx.SendChain(message.Reply(ctx.Event.MessageID), message.Text("* 福州泰禾星际传奇的的 1 台舞萌 DX:\n"+returnText+checkerUserLogin+Tips)) - }) -} - -func PlayReturnText(timeCost string, playerNumber int, played int) string { - timeCostToint, _ := strconv.ParseInt(timeCost, 10, 64) - if timeCostToint > 120 { - return "\n今天共有 " + strconv.Itoa(playerNumber) + " 位玩家登录了 " + strconv.Itoa(played) + " 次" - } - return "在过去的" + timeCost + "分钟内共有 " + strconv.Itoa(playerNumber) + " 玩家登录了 " + strconv.Itoa(played) + " 次" -} -func ReturnNewestUser(login UserLogin) string { - getNow := time.Now() - getTime, err := time.Parse(time.RFC3339Nano, login.LoginTime) - if err != nil { - panic(err) - } - getDuring := getNow.Sub(getTime) - getMins := getDuring.Minutes() - minsInt := int(getMins) - minsStr := strconv.Itoa(minsInt) - return "\n距离上一次开始游玩为~: " + minsStr + " 分钟前~" -} -func CheckerTimeUpper(string2 string) string { - switch { - case time.Now().Hour() <= 9 && time.Now().Hour() >= 6: - return []string{"我的天哪还搁着" + string2 + "呢! 你也不看看现在几点啊", "这个时间堵门是不是太早了点??? 妈诶", "要不然先去吃个早饭解决一下堵门过早的问题?(", "哎wmc 天天" + string2, " 没救了都"}[rand.Intn(4)] - case time.Now().Hour() >= 0 && time.Now().Hour() <= 5: - return []string{"哎wmc 怎么这个点还想着打mai哎, 歪, 这个点有人吗?", "我的天哪还搁着" + string2 + "呢! 你也不看看现在几点啊", " 去 睡 觉 ! 你不看看几点了啊歪! "}[rand.Intn(3)] - case time.Now().Hour() >= 23: - return []string{"哎wmc 怎么这个点还想着打mai哎, 歪, 这个点有人吗?", "我的天哪还搁着" + string2 + "呢! 你也不看看现在几点啊", " 去 睡 觉 ! 你不看看几点了啊歪! "}[rand.Intn(3)] - default: - return "" - } -} diff --git a/plugin/mai/main.go b/plugin/mai/main.go index 2935dcc..a20a89e 100644 --- a/plugin/mai/main.go +++ b/plugin/mai/main.go @@ -365,12 +365,6 @@ func init() { engine.OnRegex(`^(网咋样|[! !/](mai|b50)\sstatus$)`).SetBlock(true).Handle(func(ctx *zero.Ctx) { // getWebStatus := ReturnWebStatus() getZlibError := ReturnZlibError() - getPlayedStatus, err := web.GetData("https://maihook.lemonkoi.one/api/calc") - if err != nil { - return - } - var playerStatus RealConvertPlay - json.Unmarshal(getPlayedStatus, &playerStatus) // 20s one request. var getLucyRespHandler int if getZlibError.Full.Field3 < 180 { diff --git a/plugin/mai/sql.go b/plugin/mai/sql.go index 9a8d6f0..6c34921 100644 --- a/plugin/mai/sql.go +++ b/plugin/mai/sql.go @@ -137,7 +137,7 @@ func GetUserIDFromDatabase(userQQ int64) UserIDToQQ { return infosql } -// GetUserIDFromDatabase Params: user qq id ==> user maimai id. +// GetUserQQFromDatabase Params: user qq id ==> user maimai id. func GetUserQQFromDatabase(userid int64) UserIDToQQ { maiLocker.Lock() defer maiLocker.Unlock() diff --git a/plugin/mai/struct.go b/plugin/mai/struct.go index 3486c68..549d8c5 100644 --- a/plugin/mai/struct.go +++ b/plugin/mai/struct.go @@ -31,40 +31,6 @@ import ( "golang.org/x/text/width" ) -type RealConvertPlay struct { - ReturnValue []struct { - SkippedCount int `json:"skippedCount"` - RetriedCount int `json:"retriedCount"` - RetryCountSum int `json:"retryCountSum"` - TotalCount int `json:"totalCount"` - FailedCount int `json:"failedCount"` - } `json:"returnValue"` -} - -type WebPingStauts struct { - Details struct { - MaimaiDXCN struct { - Uptime float64 `json:"uptime"` - } `json:"maimai DX CN"` - MaimaiDXCNDXNet struct { - Uptime float64 `json:"uptime"` - } `json:"maimai DX CN DXNet"` - MaimaiDXCNMain struct { - Uptime float64 `json:"uptime"` - } `json:"maimai DX CN Main"` - MaimaiDXCNNetLogin struct { - Uptime float64 `json:"uptime"` - } `json:"maimai DX CN NetLogin"` - MaimaiDXCNTitle struct { - Uptime float64 `json:"uptime"` - } `json:"maimai DX CN Title"` - MaimaiDXCNUpdate struct { - Uptime float64 `json:"uptime"` - } `json:"maimai DX CN Update"` - } `json:"details"` - Status bool `json:"status"` -} - type ZlibErrorStatus struct { Full struct { Field1 int `json:"10"` @@ -764,55 +730,6 @@ func ConvertZlib(value, total int) string { return fmt.Sprintf("%.3f%%", percentage) } -func ConvertRealPlayWords(retry RealConvertPlay) string { - var pickedWords string - var count = 0 - var header = " - 错误率数据收集自机台的真实网络通信,可以反映舞萌 DX 的网络状况。\n" - - for _, word := range retry.ReturnValue { - var timeCount int - var UserReturnLogs string - switch { - case count == 0: - timeCount = 10 - case count == 1: - timeCount = 30 - case count == 2: - timeCount = 60 - } - - if word.TotalCount < 20 { - UserReturnLogs = "没有收集到足够的数据进行分析~" - } else { - totalSuccess := word.TotalCount - word.FailedCount - skippedRate := float64(word.SkippedCount) / float64(totalSuccess) * 100 - otherErrorRate := float64(word.RetryCountSum) / float64(totalSuccess+word.RetryCountSum) * 100 - overallErrorRate := (float64(word.SkippedCount+word.RetryCountSum) / float64(totalSuccess+word.RetryCountSum)) * 100 - skippedRate = math.Round(skippedRate*100) / 100 - otherErrorRate = math.Round(otherErrorRate*100) / 100 - overallErrorRate = math.Round(overallErrorRate*100) / 100 - UserReturnLogs = fmt.Sprintf("共 %d 个成功的请求中,有 %d 次未压缩(%.2f%%),有 %d 个请求共 %d 次其他错误(%.2f%%),整体错误率为 %.2f%%。", totalSuccess, word.SkippedCount, skippedRate, word.RetriedCount, word.RetryCountSum, otherErrorRate, overallErrorRate) - } - - pickedWords = pickedWords + fmt.Sprintf("\n - 在 %d 分钟内%s", timeCount, UserReturnLogs) - count = count + 1 - - } - var AdditionReply string - switch { - case retry.ReturnValue[2].FailedCount > 8: - AdditionReply = fmt.Sprintf(" 💥在过去的 60 分钟内 出现 Wahlap Service 在多次尝试访问下未响应 (错误次数: %d 次) , 游戏服务器可能出现严重问题, 目前正在运行的加速方案失效, Bot服务可能会出现未响应错误 ,请耐心等待官方服务器修复 ( ", retry.ReturnValue[2].FailedCount) - } - if float64(retry.ReturnValue[2].RetryCountSum)/float64(retry.ReturnValue[2].TotalCount-retry.ReturnValue[2].FailedCount+retry.ReturnValue[2].RetryCountSum) > 0.3 && AdditionReply == "" { - AdditionReply = "❌ Wahlap Service 重试率较高,所有机台登录和保存成绩时均可能耗时较长, Bot 服务可能会出现长期未响应错误. " - } - if float64(retry.ReturnValue[2].SkippedCount)/float64(retry.ReturnValue[2].TotalCount-retry.ReturnValue[2].FailedCount) > 0.2 && AdditionReply == "" { - AdditionReply = "⚠️ 压缩跳过率较高,部分未加速方案机台可能会出现登陆出现小黑屋 / 加载与保存时间过长或错误的问题, 已加速方案可忽视." - } - - return header + pickedWords + "\n\n" + AdditionReply -} - func RequestReferSong(friendID int64, songID int64, isSD bool) LxnsMaimaiRequestUserReferBestSong { var getReferType string if isSD {