mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-30 17:59:55 +03:00
Payment.py - change from_id to sender_id
This commit is contained in:
parent
3e188d0344
commit
37834c9ee8
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user