Skip to content

Commit 863a7c7

Browse files
committed
FIX: Get effective chat_id
Was leading to errors, because of callback_query
1 parent e75db6d commit 863a7c7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,10 @@ def comment(bot, update):
186186

187187

188188
def cancel(bot, update):
189-
user_id = update.callback_query.from_user.id
190-
message_id = update.callback_query.message.message_id
189+
user_id = update.effective_user.id
190+
message_id = update.effective_message.message_id
191191
callback_query_id = update.callback_query.id
192-
chat_id = update.message.chat_id
192+
chat_id = update.effective_chat.id
193193

194194
state_handler = StateHandler.get_instance()
195195
user = state_handler.get_user(user_id)

0 commit comments

Comments
 (0)