added enhanced DB functions
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -45,6 +46,11 @@ func HandleSuggest(s *discordgo.Session, i *discordgo.InteractionCreate) {
|
||||
return
|
||||
}
|
||||
|
||||
err = helpers.RemoveUserSubmittions(userID);
|
||||
if err != nil {
|
||||
log.Default().Println(fmt.Sprintf("%s", err.Error()))
|
||||
}
|
||||
|
||||
// Store new submission time
|
||||
if err := helpers.SetLastSubmission(userID); err != nil {
|
||||
helpers.HandleError(s, i, fmt.Errorf("failed to update cooldown: %w", err))
|
||||
|
||||
Reference in New Issue
Block a user