From 731aa9f1f5decf2446cd614f49d35003525797cb Mon Sep 17 00:00:00 2001 From: 2000-Trek Date: Fri, 9 Jun 2023 20:15:24 +0200 Subject: [PATCH] added an commit statment to the change function added an cp --- main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/main.py b/main.py index 6f569e7..bbe57c0 100644 --- a/main.py +++ b/main.py @@ -78,6 +78,7 @@ def change(): elif change == 0: return "

Nothing was done!

" c.execute(f"UPDATE users SET balance = balance + {change} WHERE id={user_id}") + conn.commit() c.execute(f"SELECT * FROM users WHERE id={user_id}") user = c.fetchall()[0][1] return f'

{change} was {text} {user}

back to the list'