fix: length
This commit is contained in:
parent
dfd0b74d76
commit
24254f0b6d
2 changed files with 17 additions and 18 deletions
|
@ -140,7 +140,6 @@ func learnedDataListRun(s *discordgo.Session, m any, args *[]string) {
|
||||||
if match := utils.RegexpLearnQueryLength.FindStringSubmatch(query); match != nil {
|
if match := utils.RegexpLearnQueryLength.FindStringSubmatch(query); match != nil {
|
||||||
var err error
|
var err error
|
||||||
length, err = strconv.Atoi(match[1])
|
length, err = strconv.Atoi(match[1])
|
||||||
fmt.Printf("err: %v\n", err)
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.ChannelMessageSendEmbedReply(m.ChannelID, &discordgo.MessageEmbed{
|
s.ChannelMessageSendEmbedReply(m.ChannelID, &discordgo.MessageEmbed{
|
||||||
|
@ -150,24 +149,24 @@ func learnedDataListRun(s *discordgo.Session, m any, args *[]string) {
|
||||||
}, m.Reference())
|
}, m.Reference())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if float64(length) < LIST_MIN_VALUE {
|
if float64(length) < LIST_MIN_VALUE {
|
||||||
s.ChannelMessageSendEmbedReply(m.ChannelID, &discordgo.MessageEmbed{
|
s.ChannelMessageSendEmbedReply(m.ChannelID, &discordgo.MessageEmbed{
|
||||||
Title: "❌ 오류",
|
Title: "❌ 오류",
|
||||||
Description: fmt.Sprintf("개수의 값은 %d보다 커야해요.", int(LIST_MIN_VALUE)),
|
Description: fmt.Sprintf("개수의 값은 %d보다 커야해요.", int(LIST_MIN_VALUE)),
|
||||||
Color: utils.EmbedFail,
|
Color: utils.EmbedFail,
|
||||||
}, m.Reference())
|
}, m.Reference())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if float64(length) > LIST_MAX_VALUE {
|
if float64(length) > LIST_MAX_VALUE {
|
||||||
s.ChannelMessageSendEmbedReply(m.ChannelID, &discordgo.MessageEmbed{
|
s.ChannelMessageSendEmbedReply(m.ChannelID, &discordgo.MessageEmbed{
|
||||||
Title: "❌ 오류",
|
Title: "❌ 오류",
|
||||||
Description: fmt.Sprintf("개수의 값은 %d보다 작아야해요.", int(LIST_MAX_VALUE)),
|
Description: fmt.Sprintf("개수의 값은 %d보다 작아야해요.", int(LIST_MAX_VALUE)),
|
||||||
Color: utils.EmbedFail,
|
Color: utils.EmbedFail,
|
||||||
}, m.Reference())
|
}, m.Reference())
|
||||||
return
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
case *utils.InteractionCreate:
|
case *utils.InteractionCreate:
|
||||||
m.DeferReply(true)
|
m.DeferReply(true)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"git.wh64.net/muffin/goMuffin/utils"
|
"git.wh64.net/muffin/goMuffin/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const MUFFIN_VERSION = "5.1.0-gopher_dev.250517b"
|
const MUFFIN_VERSION = "5.1.0-gopher_dev.250517c"
|
||||||
|
|
||||||
var updatedString string = utils.RegexpDecimals.FindAllStringSubmatch(MUFFIN_VERSION, -1)[3][0]
|
var updatedString string = utils.RegexpDecimals.FindAllStringSubmatch(MUFFIN_VERSION, -1)[3][0]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue