xp: Fix SQL query

master
Luther Wen Xu 2019-11-17 22:52:44 +07:00
parent c9c68d7e88
commit 705eb52759
Signed by: chanbakjsd
GPG Key ID: B7D77E3E9D102B70
1 changed files with 1 additions and 1 deletions

@ -32,7 +32,7 @@ func incrementXP(dg *discordgo.Session, discordID string) {
logError(dg, "incrementXP", "begin", discordID, err) logError(dg, "incrementXP", "begin", discordID, err)
return 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 { if err != nil {
logError(dg, "incrementXP", "insert", discordID, err) logError(dg, "incrementXP", "insert", discordID, err)
tx.Rollback() tx.Rollback()