import asyncio
from aiogram import Bot, Dispatcher
from aiogram.types import BotCommand
from aiogram.contrib.fsm_storage.memory import MemoryStorage
async def set_commands(bot: Bot):
commands = [
BotCommand(command="/drinks", description="Заказать напитки"),
BotCommand(command="/food", description="Заказать блюда"),
BotCommand(command="/cancel", description="Отменить текущее действие")
]
await bot.set_my_commands(commands)
results = []
results.append(f"{site}: {port} порт активен")
with open('res.txt', 'a', encoding='UTF-8') as f:
f.write("\n".join(results))