From 0e53b0d2343a20f3b465a185b1871b63a6874000 Mon Sep 17 00:00:00 2001 From: Pavel_Duron Date: Thu, 3 Nov 2022 01:01:08 +1000 Subject: [PATCH] =?UTF-8?q?=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=B2=D1=80?= =?UTF-8?q?=D0=B5=D0=BC=D0=B5=D0=BD=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bot.py b/bot.py index 7040682..325e110 100644 --- a/bot.py +++ b/bot.py @@ -1,6 +1,6 @@ from cgitb import text import time -from datetime import datetime +import datetime date = datetime import logging @@ -14,11 +14,12 @@ logging.basicConfig(level=logging.DEBUG) bot = Bot(token=API_TOKEN) dp = Dispatcher(bot) +current_time = datetime.datetime.now() -@dp.message_handler(commands=time) +@dp.message_handler(commands=["time"]) async def send_time(message: types.Message): - await message.reply(print(current_time)) #отображение времени, пока не рабоатет - current_time = datetime.now() + await message.reply(current_time) #отображение времени, пока не рабоатет + """"async def set_default_commands(dp): await dp.bot.set_my_commands([