isaacalan
isaacalan

Reputation: 73

I used Update.callback_query after which i used Update.message in same function its not working

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

Answers (1)

jeffffc
jeffffc

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

Related Questions