diff --git a/telethon_examples/payment.py b/telethon_examples/payment.py index 4586536a..5c5946ab 100644 --- a/telethon_examples/payment.py +++ b/telethon_examples/payment.py @@ -85,9 +85,9 @@ async def payment_received_handler(event): payment: types.MessageActionPaymentSentMe = event.message.action # do something after payment was recieved 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.sender_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.sender_id, 'Thank you for buying product B!') raise events.StopPropagation