mirror of
https://github.com/Xtao-Labs/iShotaBot.git
synced 2024-11-21 22:58:09 +00:00
feat: donate amount
This commit is contained in:
parent
148a393068
commit
10c43d0647
@ -9,12 +9,19 @@ from init import bot
|
||||
filters.incoming & filters.command(["donate", f"donate@{bot.me.username}"])
|
||||
)
|
||||
async def send_donate(_, message: Message):
|
||||
amount = 10
|
||||
try:
|
||||
amount = int(message.command[1])
|
||||
except Exception:
|
||||
pass
|
||||
if amount < 1 or amount > 1000:
|
||||
amount = 10
|
||||
await bot.send_invoice(
|
||||
message.chat.id,
|
||||
title="Donate",
|
||||
description="Support me",
|
||||
currency="XTR",
|
||||
prices=[LabeledPrice(label="Star", amount=10)],
|
||||
prices=[LabeledPrice(label="Star", amount=amount)],
|
||||
payload="stars"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user