вывод времени

This commit is contained in:
Pavel_Duron 2022-11-03 00:42:49 +10:00
parent 9ab8401ddc
commit 1f1e47c912

2
bot.py
View File

@ -14,11 +14,11 @@ logging.basicConfig(level=logging.DEBUG)
bot = Bot(token=API_TOKEN) bot = Bot(token=API_TOKEN)
dp = Dispatcher(bot) dp = Dispatcher(bot)
current_time = datetime.now()
@dp.message_handler(commands=time) @dp.message_handler(commands=time)
async def send_time(message: types.Message): async def send_time(message: types.Message):
await message.reply(print(current_time)) #отображение времени, пока не рабоатет await message.reply(print(current_time)) #отображение времени, пока не рабоатет
current_time = datetime.now()
""""async def set_default_commands(dp): """"async def set_default_commands(dp):
await dp.bot.set_my_commands([ await dp.bot.set_my_commands([