From 26c96e56374097c08566b27e7b305dec1d579722 Mon Sep 17 00:00:00 2001 From: Siwoo Jeon Date: Sat, 12 Jul 2025 23:55:12 +0900 Subject: [PATCH] format: fix code style --- components/deleteLearnedData.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/deleteLearnedData.go b/components/deleteLearnedData.go index 5a8baf6..be8465a 100644 --- a/components/deleteLearnedData.go +++ b/components/deleteLearnedData.go @@ -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{