From a7b747ebcbf711debe09a6dcf4e9d51a98a3dc50 Mon Sep 17 00:00:00 2001 From: Elara6331 Date: Sat, 20 Jan 2024 21:54:56 -0800 Subject: [PATCH] Fix vetting command --- internal/db/vetting.go | 4 ++-- internal/systems/vetting/commands.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/db/vetting.go b/internal/db/vetting.go index 25336db..7326803 100644 --- a/internal/db/vetting.go +++ b/internal/db/vetting.go @@ -37,7 +37,7 @@ func VettingReqUserID(guildID, msgID string) (string, error) { return out, err } -func RemoveVettingReq(guildID, msgID string) error { - _, err := db.Exec("DELETE FROM vetting_requests WHERE msg_id = ? AND guild_id = ?", msgID, guildID) +func RemoveVettingReq(guildID, userID string) error { + _, err := db.Exec("DELETE FROM vetting_requests WHERE user_id = ? AND guild_id = ?", userID, guildID) return err } diff --git a/internal/systems/vetting/commands.go b/internal/systems/vetting/commands.go index 6f361da..b74b158 100644 --- a/internal/systems/vetting/commands.go +++ b/internal/systems/vetting/commands.go @@ -137,7 +137,7 @@ func approveCmd(s *discordgo.Session, i *discordgo.InteractionCreate) error { return err } - err = db.RemoveVettingReq(i.GuildID, i.Message.ID) + err = db.RemoveVettingReq(i.GuildID, user.ID) if err != nil { return err }