database_module #17

Merged
Miroslavsckaya merged 20 commits from database_interaction into master 2022-05-29 20:19:18 +00:00
Showing only changes of commit a5422cab39 - Show all commits

View file

@ -13,7 +13,7 @@ class Database():
self.conn.commit()
return self.cur.lastrowid
def get_user(self, telegram_id: str) -> int | None:
def find_user(self, telegram_id: str) -> int | None:
self.cur.execute('SELECT id FROM users WHERE telegram_id = :telegram_id', {'telegram_id': telegram_id})
user_id = self.cur.fetchone()
if user_id is None: