From 705eb52759ea35e1a582cc333c9a31527547fde4 Mon Sep 17 00:00:00 2001 From: Luther Wen Xu Date: Sun, 17 Nov 2019 22:52:44 +0800 Subject: [PATCH] xp: Fix SQL query --- xp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xp.go b/xp.go index 5e804fd..98862bc 100644 --- a/xp.go +++ b/xp.go @@ -32,7 +32,7 @@ func incrementXP(dg *discordgo.Session, discordID string) { logError(dg, "incrementXP", "begin", discordID, err) return } - _, err = tx.Exec("INSERT INTO xp(id, xp) VALUES(?, ?) ON CONFLICT(id) DO UPDATE SET xp = xp+?;", discordID, amountToIncrement) + _, err = tx.Exec("INSERT INTO xp(id, xp) VALUES(?, ?) ON CONFLICT(id) DO UPDATE SET xp = xp+?;", discordID, amountToIncrement, amountToIncrement) if err != nil { logError(dg, "incrementXP", "insert", discordID, err) tx.Rollback()