format: fix code style

This commit is contained in:
Siwoo Jeon 2025-07-12 23:55:12 +09:00
parent 6a78106136
commit 26c96e5637
Signed by: migan
GPG key ID: 036E9A8C5E8E48DA

View file

@ -25,10 +25,9 @@ var DeleteLearnedDataComponent *commands.Component = &commands.Component{
i.Reply(&discordgo.InteractionResponseData{
Flags: discordgo.MessageFlagsEphemeral | discordgo.MessageFlagsIsComponentsV2,
Components: []discordgo.MessageComponent{
utils.GetErrorContainer(discordgo.TextDisplay{Content: "당신은 해당 권한이 없ㅇ어요."}),
utils.GetDeclineContainer(discordgo.TextDisplay{Content: "당신은 해당 권한이 없ㅇ어요."}),
},
},
)
})
return false
}
return true
@ -42,9 +41,10 @@ var DeleteLearnedDataComponent *commands.Component = &commands.Component{
}
id, itemId := utils.GetDeleteLearnedDataId(i.MessageComponentData().CustomID)
fmt.Println(id, itemId)
databases.Database.Learns.DeleteOne(context.TODO(), databases.Learn{Id: id})
_, err = databases.Database.Learns.DeleteOne(context.TODO(), databases.Learn{Id: id})
if err != nil {
return err
}
flags := discordgo.MessageFlagsIsComponentsV2
return i.EditReply(&utils.InteractionEdit{