format Black

This commit is contained in:
Rykov7
2023-02-22 18:53:12 +03:00
parent 23a93b5dbd
commit d0cf0762c8
13 changed files with 356 additions and 205 deletions
+18 -9
View File
@@ -1,19 +1,28 @@
from telebot.types import LabeledPrice, Message, PreCheckoutQuery
from ..config import YOOPAY, bot
prices = [LabeledPrice('Сумма', 100_00)]
prices = [LabeledPrice("Сумма", 100_00)]
@bot.message_handler(commands=['donate'])
@bot.message_handler(commands=["donate"])
def request_invoice(message: Message):
bot.send_invoice(message.chat.id, 'Поддержать проект', 'Stan', 'donate_stan', provider_token=YOOPAY,
currency='RUB', prices=prices,
provider_data='{"capture": true}',
max_tip_amount=500_000_00,
suggested_tip_amounts=[150_00, 300_00, 500_00, 1_000_00], capture=True,
)
bot.send_invoice(
message.chat.id,
"Поддержать проект",
"Stan",
"donate_stan",
provider_token=YOOPAY,
currency="RUB",
prices=prices,
provider_data='{"capture": true}',
max_tip_amount=500_000_00,
suggested_tip_amounts=[150_00, 300_00, 500_00, 1_000_00],
capture=True,
)
@bot.pre_checkout_query_handler(func=lambda a: True)
def process_pre_checkout(q: PreCheckoutQuery):
bot.answer_pre_checkout_query(q.id, True, 'Извините, пожертвования больше не принимаем!')
bot.answer_pre_checkout_query(
q.id, True, "Извините, пожертвования больше не принимаем!"
)