Compare commits
No commits in common. "main" and "develop" have entirely different histories.
4 changed files with 11 additions and 29 deletions
|
@ -173,23 +173,6 @@ func learnRun(c *Command, s *discordgo.Session, m any, args *[]string) {
|
|||
}
|
||||
}
|
||||
|
||||
if len([]rune(command)) > 100 {
|
||||
embed := &discordgo.MessageEmbed{
|
||||
Title: "❌ 오류",
|
||||
Description: "단어는 100글자를 못 넘ㅇ어가요.",
|
||||
Color: utils.EmbedFail,
|
||||
}
|
||||
|
||||
switch m := m.(type) {
|
||||
case *discordgo.MessageCreate:
|
||||
s.ChannelMessageSendEmbedReply(m.ChannelID, embed, m.Reference())
|
||||
case *utils.InteractionCreate:
|
||||
m.EditReply(&discordgo.WebhookEdit{
|
||||
Embeds: &[]*discordgo.MessageEmbed{embed},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
_, err := databases.Database.Learns.InsertOne(context.TODO(), databases.InsertLearn{
|
||||
Command: command,
|
||||
Result: result,
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"git.wh64.net/muffin/goMuffin/utils"
|
||||
)
|
||||
|
||||
const MUFFIN_VERSION = "5.1.1-gopher_release.250526a"
|
||||
const MUFFIN_VERSION = "5.1.0-gopher_dev.250517c"
|
||||
|
||||
var updatedString string = utils.RegexpDecimals.FindAllStringSubmatch(MUFFIN_VERSION, -1)[3][0]
|
||||
|
||||
|
|
|
@ -59,6 +59,16 @@ func MessageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||
args := argParser(content)
|
||||
command := commands.Discommand.Aliases[args[0]]
|
||||
|
||||
if m.Author.ID == config.Train.UserID {
|
||||
if _, err := databases.Database.Texts.InsertOne(context.TODO(), databases.InsertText{
|
||||
Text: content,
|
||||
Persona: "muffin",
|
||||
CreatedAt: time.Now(),
|
||||
}); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
}
|
||||
|
||||
if command == "" {
|
||||
s.ChannelTyping(m.ChannelID)
|
||||
|
||||
|
@ -148,15 +158,6 @@ func MessageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
|||
commands.Discommand.MessageRun(command, s, m, args[1:])
|
||||
return
|
||||
} else {
|
||||
if m.Author.ID == config.Train.UserID {
|
||||
if _, err := databases.Database.Texts.InsertOne(context.TODO(), databases.InsertText{
|
||||
Text: m.Content,
|
||||
Persona: "muffin",
|
||||
CreatedAt: time.Now(),
|
||||
}); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,8 +29,6 @@ func DBMigrate(n *commando.Node) error {
|
|||
|
||||
wg.Add(3)
|
||||
|
||||
fmt.Println("[경고] 해당 명령어는 다음 버전에서 사라져요.")
|
||||
|
||||
// statement -> text
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
|
|
Loading…
Reference in a new issue