refactor: update methods to include show_sender parameter and clean up tests

This commit is contained in:
bohd4nx
2026-03-14 01:34:51 +02:00
parent 6c869428aa
commit 4e017cb7a1
11 changed files with 26 additions and 52 deletions
+7 -7
View File
@@ -134,8 +134,8 @@ async def main():
result = await topup_ton("@username", 10)
print(result)
# Gift 6 months of Telegram Premium
result = await buy_premium("@username", 6)
# Gift 6 months of Telegram Premium (anonymous — recipient won't see sender)
result = await buy_premium("@username", 6, show_sender=False)
print(result)
# Buy 500 Stars for @username
@@ -170,11 +170,11 @@ asyncio.run(main())
### Supported Operations
| Operation | Function | Parameters | Limits |
| ------------------ | ------------------------------- | ---------------------- | ------------------- |
| **TON Topup** | `topup_ton(username, amount)` | Username, TON amount | 11,000,000,000 TON |
| **Premium Gift** | `buy_premium(username, months)` | Username, duration | 3, 6, or 12 months |
| **Stars Purchase** | `buy_stars(username, amount)` | Username, Stars amount | 501,000,000 Stars |
| Operation | Function | Parameters | Limits |
| ------------------ | ----------------------------------------------------- | ----------------------------------- | ------------------- |
| **TON Topup** | `topup_ton(username, amount, show_sender=True)` | Username, TON amount, show sender | 11,000,000,000 TON |
| **Premium Gift** | `buy_premium(username, months, show_sender=True)` | Username, duration, show sender | 3, 6, or 12 months |
| **Stars Purchase** | `buy_stars(username, amount, show_sender=True)` | Username, Stars amount, show sender | 501,000,000 Stars |
Usernames can be passed with or without `@`.