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:
@@ -19,9 +19,9 @@
|
|||||||
"AutoCreateAccount": true,
|
"AutoCreateAccount": true,
|
||||||
"CleanDB": false,
|
"CleanDB": false,
|
||||||
"MaxLauncherHR": false,
|
"MaxLauncherHR": false,
|
||||||
"LogInboundMessages": true,
|
"LogInboundMessages": false,
|
||||||
"LogOutboundMessages": true,
|
"LogOutboundMessages": false,
|
||||||
"LogMessageData": true,
|
"LogMessageData": false,
|
||||||
"MaxHexdumpLength": 256,
|
"MaxHexdumpLength": 256,
|
||||||
"DivaEvent": 0,
|
"DivaEvent": 0,
|
||||||
"FestaEvent": -1,
|
"FestaEvent": -1,
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
"Port": 53312
|
"Port": 53312
|
||||||
},
|
},
|
||||||
"SignV2": {
|
"SignV2": {
|
||||||
"Enabled": true,
|
"Enabled": false,
|
||||||
"Port": 8080,
|
"Port": 8080,
|
||||||
"PatchServer": "",
|
"PatchServer": "",
|
||||||
"Banners": [],
|
"Banners": [],
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ func (s *Server) onInteraction(ds *discordgo.Session, i *discordgo.InteractionCr
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
err = ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||||
Data: &discordgo.InteractionResponseData{
|
Data: &discordgo.InteractionResponseData{
|
||||||
@@ -82,17 +83,20 @@ func (s *Server) onInteraction(ds *discordgo.Session, i *discordgo.InteractionCr
|
|||||||
Flags: discordgo.MessageFlagsEphemeral,
|
Flags: discordgo.MessageFlagsEphemeral,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case "password":
|
case "password":
|
||||||
password, _ := bcrypt.GenerateFromPassword([]byte(i.ApplicationCommandData().Options[0].StringValue()), 10)
|
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)
|
_, err := s.db.Exec("UPDATE users SET password = $1 WHERE discord_id = $2", password, i.Member.User.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.logger.Error(fmt.Sprint(err))
|
s.logger.Error(fmt.Sprint(err))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
err = ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
err = ds.InteractionRespond(i.Interaction, &discordgo.InteractionResponse{
|
||||||
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
Type: discordgo.InteractionResponseChannelMessageWithSource,
|
||||||
Data: &discordgo.InteractionResponseData{
|
Data: &discordgo.InteractionResponseData{
|
||||||
|
|||||||
Reference in New Issue
Block a user