mirror of
https://github.com/MrSedan/neuro-reply-bot-reworked.git
synced 2026-01-15 05:59:43 +03:00
feat: started proxy alerts
This commit is contained in:
17
handlers/message_handlers/proxy/proxy_status_command.py
Normal file
17
handlers/message_handlers/proxy/proxy_status_command.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from datetime import datetime
|
||||
|
||||
from aiogram import types
|
||||
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
||||
|
||||
from handlers.filters.proxy_status import ProxyStatusFilter
|
||||
|
||||
from ..handler import MessageHandlerABC
|
||||
|
||||
|
||||
class ProxyStatusCallback(MessageHandlerABC):
|
||||
filter = ProxyStatusFilter()
|
||||
async def _command(self, data: types.CallbackQuery):
|
||||
builder = InlineKeyboardBuilder()
|
||||
builder.button(text="Обновить статус🔄", callback_data="refresh_proxy_status")
|
||||
date = datetime.now().strftime("%d.%m.%Y %H:%M:%S")
|
||||
await self.bot.edit_message_text(f'{date} - Работаит', data.message.chat.id, data.message.message_id, reply_markup=builder.as_markup())
|
||||
Reference in New Issue
Block a user