mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Fix payment.py example (#4005)
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user