0

update.callback_query.from_user Inside the same function I used
update.message.text where i tried to get message from user update.message.text is not working giving me 'NoneType' object has no attribute 'text' how can i use two update in same function

isaacalan
  • 73
  • 1
  • 8

1 Answers1

1

To be exact you can find the message object (or/and the text) of a callback_query at update.callback_query.message.text.

Or for convenience you can always use update.effective_chat, update.effective_message and update.effective_user to access the chat, message and from_user objects wherever they are in (no matter it's a normal message, a callback_query, an inline_query etc.)

jeffffc
  • 772
  • 4
  • 13