From ceb43511ef64df3bee419352cb16548af4259971 Mon Sep 17 00:00:00 2001 From: Pavel_Duron Date: Wed, 9 Nov 2022 22:57:49 +1000 Subject: [PATCH] fix --- bot.py | 2 +- sqdb.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index fe1b295..756b5c1 100644 --- a/bot.py +++ b/bot.py @@ -49,7 +49,7 @@ async def dick(message: types.Message): @dp.message_handler(commands=["id"]) async def ident(message: types.Message): lisq = user(user_id = message.from_user.id, user_fullname = message.from_user.full_name) - tert.adding() + await tert.adding() await bot.send_message(message.chat.id, f'{message.from_user.id} + {message.from_user.full_name}') diff --git a/sqdb.py b/sqdb.py index 41c899d..f7f0b13 100644 --- a/sqdb.py +++ b/sqdb.py @@ -2,7 +2,6 @@ from sqlalchemy import create_engine, MetaData, Table, Integer, String, \ Column, DateTime, ForeignKey, Numeric from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker -import bot engine = create_engine('sqlite:///dick3.db') Session = sessionmaker(bind=engine) @@ -26,7 +25,7 @@ class user(Base): class tert: - def adding(): + async def adding(): session.add(lisq) session.commit()