add tariffs stats
This commit is contained in:
@@ -19,7 +19,7 @@ bot = Bot(token=API_TOKEN, default=DefaultBotProperties(parse_mode=ParseMode.HTM
|
||||
storage = MemoryStorage()
|
||||
dp = Dispatcher(bot=bot, storage=storage)
|
||||
|
||||
version = "4.3-dev"
|
||||
version = "4.3-b160510"
|
||||
|
||||
|
||||
register_middleware(dp)
|
||||
|
||||
@@ -230,6 +230,7 @@ async def view_tariff(callback: CallbackQuery, callback_data: AdminTariffCallbac
|
||||
|
||||
t = dict(tariff)
|
||||
traffic_text = f"{t['traffic_limit'] // 1024**3} ГБ" if t["traffic_limit"] else "Безлимит"
|
||||
device_text = f"{t['device_limit']}" if t["device_limit"] is not None else "Безлимит"
|
||||
|
||||
text = (
|
||||
f"<b>📄 Тариф: {t['name']}</b>\n\n"
|
||||
@@ -237,6 +238,7 @@ async def view_tariff(callback: CallbackQuery, callback_data: AdminTariffCallbac
|
||||
f"📅 Длительность: <b>{t['duration_days']} дней</b>\n"
|
||||
f"💰 Стоимость: <b>{t['price_rub']}₽</b>\n"
|
||||
f"📦 Трафик: <b>{traffic_text}</b>\n"
|
||||
f"📱 Устройств: <b>{device_text}</b>\n"
|
||||
f"{'✅ Активен' if t['is_active'] else '⛔ Отключен'}"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user