rename get_user method to find_user
This commit is contained in:
parent
baa215334f
commit
a5422cab39
|
@ -13,7 +13,7 @@ class Database():
|
||||||
self.conn.commit()
|
self.conn.commit()
|
||||||
return self.cur.lastrowid
|
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})
|
self.cur.execute('SELECT id FROM users WHERE telegram_id = :telegram_id', {'telegram_id': telegram_id})
|
||||||
user_id = self.cur.fetchone()
|
user_id = self.cur.fetchone()
|
||||||
if user_id is None:
|
if user_id is None:
|
||||||
|
|
Loading…
Reference in a new issue