fix: length

This commit is contained in:
Siwoo Jeon 2025-05-17 11:53:38 +09:00
parent dfd0b74d76
commit 24254f0b6d
Signed by: migan
GPG key ID: 036E9A8C5E8E48DA
2 changed files with 17 additions and 18 deletions

View file

@ -140,7 +140,6 @@ func learnedDataListRun(s *discordgo.Session, m any, args *[]string) {
if match := utils.RegexpLearnQueryLength.FindStringSubmatch(query); match != nil {
var err error
length, err = strconv.Atoi(match[1])
fmt.Printf("err: %v\n", err)
if err != nil {
s.ChannelMessageSendEmbedReply(m.ChannelID, &discordgo.MessageEmbed{
@ -150,7 +149,6 @@ func learnedDataListRun(s *discordgo.Session, m any, args *[]string) {
}, m.Reference())
return
}
}
if float64(length) < LIST_MIN_VALUE {
s.ChannelMessageSendEmbedReply(m.ChannelID, &discordgo.MessageEmbed{
@ -169,6 +167,7 @@ func learnedDataListRun(s *discordgo.Session, m any, args *[]string) {
}, 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.250517b"
const MUFFIN_VERSION = "5.1.0-gopher_dev.250517c"
var updatedString string = utils.RegexpDecimals.FindAllStringSubmatch(MUFFIN_VERSION, -1)[3][0]