|
|
@ -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()
|
|
|
|