add get_user method
This commit is contained in:
parent
565b3ae87a
commit
91e84bfd67
|
@ -12,6 +12,11 @@ class Database():
|
|||
self.cur.execute('INSERT INTO users (telegram_id) VALUES (:telegram_id)', {'telegram_id': telegram_id})
|
||||
return self.cur.lastrowid
|
||||
|
||||
def get_user(self, telegram_id: str) -> tuple | None:
|
||||
self.cur.execute('SELECT id FROM users WHERE telegram_id = :telegram_id', {'telegram_id': telegram_id})
|
||||
id = self.cur.fetchone()
|
||||
return id
|
||||
|
||||
def add_rss_feed():
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in a new issue