mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 15:34:38 +01:00
refactor: Fix code formatting and reset config
This commit is contained in:
@@ -75,6 +75,7 @@ func (s *Server) onInteraction(ds *discordgo.Session, i *discordgo.InteractionCr
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
err = ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||
Data: &discordgo.InteractionResponseData{
|
||||
@@ -82,17 +83,20 @@ func (s *Server) onInteraction(ds *discordgo.Session, i *discordgo.InteractionCr
|
||||
Flags: discordgo.MessageFlagsEphemeral,
|
||||
},
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
break
|
||||
case "password":
|
||||
password, _ := bcrypt.GenerateFromPassword([]byte(i.ApplicationCommandData().Options[0].StringValue()), 10)
|
||||
|
||||
_, err := s.db.Exec("UPDATE users SET password = $1 WHERE discord_id = $2", password, i.Member.User.ID)
|
||||
if err != nil {
|
||||
s.logger.Error(fmt.Sprint(err))
|
||||
return
|
||||
}
|
||||
|
||||
err = ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||
Data: &discordgo.InteractionResponseData{
|
||||
|
||||
Reference in New Issue
Block a user