mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
parent
b192c3e6a3
commit
3150726f32
|
@ -170,6 +170,7 @@ For backwards compatibility with ``PySocks`` the following format
|
||||||
is possible (but discouraged):
|
is possible (but discouraged):
|
||||||
|
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
proxy = (socks.SOCKS5, '1.1.1.1', 5555, True, 'foo', 'bar')
|
proxy = (socks.SOCKS5, '1.1.1.1', 5555, True, 'foo', 'bar')
|
||||||
|
|
||||||
.. __: https://github.com/romis2012/python-socks#installation
|
.. __: https://github.com/romis2012/python-socks#installation
|
||||||
|
|
|
@ -83,7 +83,7 @@ async def payment_pre_checkout_handler(event: types.UpdateBotPrecheckoutQuery):
|
||||||
async def payment_received_handler(event):
|
async def payment_received_handler(event):
|
||||||
if isinstance(event.message.action, types.MessageActionPaymentSentMe):
|
if isinstance(event.message.action, types.MessageActionPaymentSentMe):
|
||||||
payment: types.MessageActionPaymentSentMe = event.message.action
|
payment: types.MessageActionPaymentSentMe = event.message.action
|
||||||
# do something after payment was recieved
|
# do something after payment was received
|
||||||
if payment.payload.decode('UTF-8') == 'product A':
|
if payment.payload.decode('UTF-8') == 'product A':
|
||||||
await bot.send_message(event.message.from_id, 'Thank you for buying product A!')
|
await bot.send_message(event.message.from_id, 'Thank you for buying product A!')
|
||||||
elif payment.payload.decode('UTF-8') == 'product B':
|
elif payment.payload.decode('UTF-8') == 'product B':
|
||||||
|
|
Loading…
Reference in New Issue
Block a user