format: fix code style
This commit is contained in:
parent
6a78106136
commit
26c96e5637
1 changed files with 6 additions and 6 deletions
|
@ -25,10 +25,9 @@ var DeleteLearnedDataComponent *commands.Component = &commands.Component{
|
||||||
i.Reply(&discordgo.InteractionResponseData{
|
i.Reply(&discordgo.InteractionResponseData{
|
||||||
Flags: discordgo.MessageFlagsEphemeral | discordgo.MessageFlagsIsComponentsV2,
|
Flags: discordgo.MessageFlagsEphemeral | discordgo.MessageFlagsIsComponentsV2,
|
||||||
Components: []discordgo.MessageComponent{
|
Components: []discordgo.MessageComponent{
|
||||||
utils.GetErrorContainer(discordgo.TextDisplay{Content: "당신은 해당 권한이 없ㅇ어요."}),
|
utils.GetDeclineContainer(discordgo.TextDisplay{Content: "당신은 해당 권한이 없ㅇ어요."}),
|
||||||
},
|
},
|
||||||
},
|
})
|
||||||
)
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
@ -42,9 +41,10 @@ var DeleteLearnedDataComponent *commands.Component = &commands.Component{
|
||||||
}
|
}
|
||||||
|
|
||||||
id, itemId := utils.GetDeleteLearnedDataId(i.MessageComponentData().CustomID)
|
id, itemId := utils.GetDeleteLearnedDataId(i.MessageComponentData().CustomID)
|
||||||
fmt.Println(id, itemId)
|
_, err = databases.Database.Learns.DeleteOne(context.TODO(), databases.Learn{Id: id})
|
||||||
|
if err != nil {
|
||||||
databases.Database.Learns.DeleteOne(context.TODO(), databases.Learn{Id: id})
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
flags := discordgo.MessageFlagsIsComponentsV2
|
flags := discordgo.MessageFlagsIsComponentsV2
|
||||||
return i.EditReply(&utils.InteractionEdit{
|
return i.EditReply(&utils.InteractionEdit{
|
||||||
|
|
Loading…
Reference in a new issue