W
W
WITCH_ink2020-06-10 21:10:36
Python
WITCH_ink, 2020-06-10 21:10:36

How to make the bot work through a mention?

How to make the bot respond to the bot, let's say, to such a command by mentioning what is needed for this?

if event.object.text == "1":
    chat = event.chat_id
    print("Айди беседы: " + f'{chat}')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Tanashchuk, 2020-06-12
@Xaeruz

If I understand you correctly, then you need this:

if event.object.text == "[id123456789|@короткое_имя(если нету тот-же самый айди)] 1":
  chat = event.chat_id
  print("Айди беседы: " + f'{chat}')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question