From be5e1fcbd5fa105aad13fb6da243f91c1a0e2a1e Mon Sep 17 00:00:00 2001 From: Pavel_Duron Date: Tue, 15 Nov 2022 17:45:33 +1000 Subject: [PATCH] =?UTF-8?q?=D1=82=D0=BE=D0=BF=20=D0=BF=D0=B8=D0=BF=D0=B8?= =?UTF-8?q?=D1=81=20tets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index c8933f1..62b9ede 100644 --- a/bot.py +++ b/bot.py @@ -105,7 +105,15 @@ async def ident(message: types.Message): #####______________________ПИПИСА БОТ БУДЕТ ЗДЕСЬ__________________________________ - +@dp.message_handler(commands=["topdick"]) +async def send_time(message: types.Message): + engine = create_engine('postgresql+psycopg2://postgres:postgres@postgres.vdk2ch.ru:5432/jack_bot', echo=True) + Session = sessionmaker(bind=engine) + session = Session() + Base = declarative_base() + for user_fullname, dick_size in session.query(user.user_fullname, user.dick_size).order_by(user.dick_size.desc()).limit(10).all(): + await bot.send_message(message.chat.id, f'Топ пипис!\n {user_fullname}: {dick_size} см') + session.close_all() @dp.message_handler(commands=['start'])