V
V
violpeople2021-06-18 13:59:42
Python
violpeople, 2021-06-18 13:59:42

What chat_id should be specified in the telegram bot?

await bot.send_photo(
    chat_id,
    photo = current_photo,
    caption='Название: '+ current_item +'\n\nЦена: '+ current_price,
    reply_markup=kb)

I use aiogram, the problem is that I don't understand what chat id I need and how to get it. I got my chat id and entered it into the chat_id variable. As a result, when using the bot on another device, the bot sends to my id what it should send to that device.
chat_id = 715888909

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2021-06-18
@violpeople

What chat_id should be specified in the telegram bot?

The one to send the message to.
When the interlocutor writes something to the bot (for example, / start), along with the message, the bot also receives the chat_id of the chat in which this message came

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question