fix: max min value

This commit is contained in:
Siwoo Jeon 2025-05-17 11:49:03 +09:00
parent 67b8c0ee86
commit dfd0b74d76
Signed by: migan
GPG key ID: 036E9A8C5E8E48DA
2 changed files with 19 additions and 1 deletions

View file

@ -151,6 +151,24 @@ func learnedDataListRun(s *discordgo.Session, m any, args *[]string) {
return
}
}
if float64(length) < LIST_MIN_VALUE {
s.ChannelMessageSendEmbedReply(m.ChannelID, &discordgo.MessageEmbed{
Title: "❌ 오류",
Description: fmt.Sprintf("개수의 값은 %d보다 커야해요.", int(LIST_MIN_VALUE)),
Color: utils.EmbedFail,
}, m.Reference())
return
}
if float64(length) > LIST_MAX_VALUE {
s.ChannelMessageSendEmbedReply(m.ChannelID, &discordgo.MessageEmbed{
Title: "❌ 오류",
Description: fmt.Sprintf("개수의 값은 %d보다 작아야해요.", int(LIST_MAX_VALUE)),
Color: utils.EmbedFail,
}, m.Reference())
return
}
case *utils.InteractionCreate:
m.DeferReply(true)

View file

@ -7,7 +7,7 @@ import (
"git.wh64.net/muffin/goMuffin/utils"
)
const MUFFIN_VERSION = "5.1.0-gopher_dev.250517a"
const MUFFIN_VERSION = "5.1.0-gopher_dev.250517b"
var updatedString string = utils.RegexpDecimals.FindAllStringSubmatch(MUFFIN_VERSION, -1)[3][0]