Skip to content

Commit

Permalink
Fix payment.py example (#4005)
Browse files Browse the repository at this point in the history
  • Loading branch information
yumupdate committed Dec 22, 2022
1 parent e750eb7 commit 061a84b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telethon_examples/payment.py
Expand Up @@ -85,9 +85,9 @@ async def payment_received_handler(event):
payment: types.MessageActionPaymentSentMe = event.message.action
# do something after payment was received
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':
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


Expand Down

0 comments on commit 061a84b

Please sign in to comment.