mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-24 18:33:44 +03:00
Fix payment.py example (#4005)
This commit is contained in:
parent
e750eb7ab5
commit
061a84bef2
|
@ -85,9 +85,9 @@ async def payment_received_handler(event):
|
||||||
payment: types.MessageActionPaymentSentMe = event.message.action
|
payment: types.MessageActionPaymentSentMe = event.message.action
|
||||||
# do something after payment was received
|
# 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.peer_id.user_id, 'Thank you for buying product A!')
|
||||||
elif payment.payload.decode('UTF-8') == 'product B':
|
elif payment.payload.decode('UTF-8') == 'product B':
|
||||||
await bot.send_message(event.message.from_id, 'Thank you for buying product B!')
|
await bot.send_message(event.message.peer_id.user_id, 'Thank you for buying product B!')
|
||||||
raise events.StopPropagation
|
raise events.StopPropagation
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user