aboutsummaryrefslogtreecommitdiffstats
path: root/database.py
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2021-12-22 18:04:09 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2021-12-22 18:04:09 +0000
commit163656ab3e58dd21a1d16d41bff9f3b0b6bf54c2 (patch)
tree0a7d082cdb4b2f80accb1e3ae21e8cf6b2f15891 /database.py
parent98844b271c7b5e5afb7f7bbcedd87e0c6292429e (diff)
downloadSmallYTChannelBot-163656ab3e58dd21a1d16d41bff9f3b0b6bf54c2.tar.gz
SmallYTChannelBot-163656ab3e58dd21a1d16d41bff9f3b0b6bf54c2.zip
added !gitignore command, removed legacy commands
Diffstat (limited to 'database.py')
-rwxr-xr-xdatabase.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/database.py b/database.py
index a5c9682..b80b548 100755
--- a/database.py
+++ b/database.py
@@ -67,6 +67,11 @@ class Database:
if commit:
self.__connection.commit()
+ def set_lambda(self, user, toset):
+ with self.__connection.cursor() as cursor:
+ cursor.execute("UPDATE users SET lambda = %s WHERE user_name = %s;", (toset, user))
+ self.__connection.commit()
+
def change_lambda(self, user, changeby):
with self.__connection.cursor() as cursor:
#this will make it go negative. You must check this operation is allowed.