Private
Public Access
forked from FOSS/AutoShop-Djimbo-Simple
feat: add Lolzteam payment method and max refill limit
This commit is contained in:
@@ -16,6 +16,7 @@ from tgbot.utils.misc.bot_models import FSM, ARS
|
||||
from tgbot.utils.misc_functions import send_admins
|
||||
|
||||
min_refill_rub = 5 # Минимальная сумма пополнения в рублях
|
||||
max_refill_rub = 150000 # Максимальная сумма пополнения в рублях
|
||||
|
||||
router = Router(name=__name__)
|
||||
|
||||
@@ -83,7 +84,7 @@ async def refill_amount_get(message: Message, bot: Bot, state: FSM, arSession: A
|
||||
return await message.answer(
|
||||
ded(f"""
|
||||
<b>❌ Неверная сумма пополнения</b>
|
||||
❗️ Cумма не должна быть меньше <code>{min_refill_rub}₽</code> и больше <code>150 000₽</code>
|
||||
❗️ Cумма не должна быть меньше <code>{min_refill_rub}₽</code> и больше <code>{max_refill_rub}₽</code>
|
||||
💰 Введите сумму для пополнения средств
|
||||
"""),
|
||||
)
|
||||
|
||||
@@ -350,8 +350,9 @@ async def get_statistics() -> str:
|
||||
users_money_have,
|
||||
users_money_give,
|
||||
) = (0, 0, 0, 0, 0, 0)
|
||||
refill_cryptobot_count, refill_cryptobot_amount = 0, 0
|
||||
refill_stars_count, refill_stars_amount = 0, 0
|
||||
|
||||
refill_cryptobot_count, refill_lolzteam_count, refill_cryptobot_amount = 0, 0, 0
|
||||
refill_stars_count, refill_lolzteam_amount, refill_stars_amount = 0, 0, 0
|
||||
|
||||
get_categories = await Categoryx().get_all()
|
||||
get_positions = await Positionx().get_all()
|
||||
@@ -384,6 +385,11 @@ async def get_statistics() -> str:
|
||||
if refill.refill_method == "Cryptobot":
|
||||
refill_cryptobot_count += 1
|
||||
refill_cryptobot_amount += refill.refill_amount
|
||||
|
||||
elif refill.refill_method == "Lolzteam":
|
||||
refill_lolzteam_count += 1
|
||||
refill_lolzteam_amount += refill.refill_amount
|
||||
|
||||
elif refill.refill_method == "Stars":
|
||||
refill_stars_count += 1
|
||||
refill_stars_amount += refill.refill_amount
|
||||
@@ -483,6 +489,7 @@ async def get_statistics() -> str:
|
||||
┃
|
||||
┣‒ Платежные системы (всего)
|
||||
┣ CryptoBot: <code>{refill_cryptobot_count}шт</code> - <code>{round(refill_cryptobot_amount, 2)}₽</code>
|
||||
┣ Lolzteam: <code>{refill_lolzteam_count}шт</code> - <code>{round(refill_lolzteam_amount, 2)}₽</code>
|
||||
┣ TG Stars: <code>{refill_stars_count}шт</code> - <code>{round(refill_stars_amount, 2)}₽</code>
|
||||
┃
|
||||
┣‒ Остальные
|
||||
|
||||
Reference in New Issue
Block a user