Skip to content

Commit

Permalink
正则修改
Browse files Browse the repository at this point in the history
  • Loading branch information
IJNKAWAKAZE committed Jun 19, 2024
1 parent 81a84cf commit cd6f578
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/web/box.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func filter(param string, rarity int) bool {
case "all":
return true
default:
matched, _ := regexp.MatchString("^[0-9\\d]+(,[0-9\\d]+)*$", param)
matched, _ := regexp.MatchString("^[1-6](,[1-6])*$", param)
if matched {
nums := strings.Split(param, ",")
for _, num := range nums {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/player/missing_handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func (_ PlayerOperationMissing) Run(uid string, userAccount account.UserAccount,
bot.Arknights.Send(sendAction)
messageId := message.MessageID
param := message.CommandArguments()
matched, _ := regexp.MatchString("^[0-9\\d]+(,[0-9\\d]+)*$", param)
matched, _ := regexp.MatchString("^[1-6](,[1-6])*$", param)
if param != "" && param != "all" && !matched {
sendMessage := tgbotapi.NewMessage(chatId, "参数错误")
sendMessage.ReplyToMessageID = messageId
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/skland/player_cultivate.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@ func getPlayerCultivateCharacterStr(characterId string, skland AccountSkland) (s
req := SKR().SetQueryParams(gh.MS{"characterId": characterId})
return SklandRequestPlayerData(req, "GET", "/api/v1/game/cultivate/character", skland)
}

func getPlayerCultivateInfoStr(skland AccountSkland) (string, error) {
return SklandRequestPlayerData(SKR(), "GET", "/api/v1/game/cultivate/info", skland)
}

0 comments on commit cd6f578

Please sign in to comment.