PytelegrambotAPI: in Inline Mode to user id?

0 like 0 dislike
8 views
PytelegrambotAPI: in Inline Mode to user id?

keyboard.add(*[types.InlineKeyboardButton(text=name,callback_data=name) for name in ['Russian','English']]) msg = bot.send_message(chat_id, 'Select language : Choose language', reply_markup=keyboard) ... @bot.callback_query_handler(func=lambda c: True) def callback_inline(c): chat_id_bot = c.message.chat.id


And how do you know chat_id (user id) of the Inline mode?
for example, the bot came off and wound up. The user clicks the language button gets in the callback
by | 8 views

3 Answers

0 like 0 dislike
well, it is where the message lies
by
0 like 0 dislike
c.from_user.id

and not c.message.chat.id
by
0 like 0 dislike
chat_id = c.from_user.id
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
33,909 users