D
D
Dmitry2021-11-25 03:27:16
Python
Dmitry, 2021-11-25 03:27:16

How to determine the telegram group id?

Hello everyone, I want the bot to automatically determine the chat ID, since I want to connect several groups, and in the examples of telegram bots, these lines:

GROUP_ID = -1idchat5

or so

target_chat = -1idchat5

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nickolay Tapokpy, 2021-11-25
@dmitriy8720

The chat id with the bot is the user id

Q
qwwwwwty, 2021-11-25
@qwwwwwty

newchat = message.chat.id
all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question