mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 23:44:52 +01:00
refactor: Change to using rand.Read instead of whatever the hell else was before
This commit is contained in:
@@ -86,10 +86,11 @@ func (s *Server) onInteraction(ds *discordgo.Session, i *discordgo.InteractionCr
|
||||
return
|
||||
}
|
||||
break
|
||||
case "passwordreset":
|
||||
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{
|
||||
|
||||
Reference in New Issue
Block a user