def ifnot(message):
with sqlite3.connect('db.db') as db:
cursor = db.cursor()
cursor.execute("SELECT * FROM username WHERE ID=?", (message.chat.id, ))
info = cursor.fetchone()
if info is None:
send_welcome(message)
else:
print('work')
return True
def ifnot(message):
#тут бд
if info is not:
return True
else:
return False
def message(message):
if ifnot() == True:
print('Нет в бд')
if ifnot() == False:
print('Есть в бд')