Restore Russian bot interface

This commit is contained in:
2026-07-20 08:58:10 +05:00
parent cea7da5d2b
commit 4adf9aa32e
7 changed files with 213 additions and 151 deletions
+11 -11
View File
@@ -16,15 +16,15 @@ router = Router(name="start")
def _welcome_text(cfg) -> str:
text = (
f"Welcome to <b>{SHOP_NAME}</b>!\n\n"
"You can sell cookies at these rates:\n"
f"💎 Добро пожаловать в <b>{SHOP_NAME}</b>!\n\n"
"💵 Здесь можно продать куки по следующим ставкам:\n"
)
for rate in cfg.rates.values():
text += f"- {rate.name}: {rate.price:.2f} RUB\n"
text += f"🔸 {rate.name}: {rate.price:.2f} \n"
return text + (
f"\nAVG pricing applies to {cfg.avg_min_cookies}+ cookies with donations.\n"
f"The AVG price is capped at {cfg.avg_min_price:.2f}-{cfg.avg_max_price:.2f} RUB per cookie.\n\n"
"Send a .txt file or paste your cookie text."
f"\n📊 <b>AVG-система ({cfg.avg_min_price:.2f}-{cfg.avg_max_price:.2f} ₽/шт):</b>\n"
f"При отправке {cfg.avg_min_cookies}+ донатных cookie бот рассчитает средний Lifetime donate и предложит выгодную цену за каждую cookie.\n\n"
"🍪 Отправьте .txt-файл или вставьте текст с cookie."
)
@@ -40,24 +40,24 @@ async def _show_start(
profile = get(user_id)
cfg = load_config()
if profile and profile.is_banned:
await message.answer(f"You are banned. Reason: {profile.ban_reason or '-'}")
await message.answer(f"❌ Вы заблокированы. Причина: {profile.ban_reason or ''}")
return
if not cfg.bot_enabled and user_id != ADMIN_ID:
await message.answer("The bot is temporarily disabled by an administrator.")
await message.answer("🚫 Бот временно отключен администратором.")
return
if is_new:
bot = get_bot() or message.bot
await log_admin(
bot,
ADMIN_ID,
f"<b>New user</b>\nID: <code>{user_id}</code>\n"
f"@{username or '-'}\nReferrer: {referrer or '-'}",
f"🆕 <b>Новый пользователь</b>\nID: <code>{user_id}</code>\n"
f"@{username or 'нет'}\nРеферер: {referrer or ''}",
get_log_bot(),
)
text = _welcome_text(cfg)
if is_admin(user_id):
text += "\n\n<b>Admin accounts cannot sell cookies. Use /admin.</b>"
text += "\n\n👑 <i>Вы администратор. Продажа cookie отключена. Используйте /admin.</i>"
await message.answer(text, parse_mode="HTML", reply_markup=main_menu_kb())