Reputation: 73
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
Upvotes: 0
Views: 2108
Reputation: 780
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.)
Upvotes: 1