A
A
Alexey2020-12-05 14:42:02
Python
Alexey, 2020-12-05 14:42:02

telebot library. Is it possible for a bot to link two users?

Is it possible to implement an anonymous chat in the cart (two users write a command to the bot to search for an interlocutor, the bot connects these two users and acts as an intermediary that passes the message of one user to another)? If yes, how to do it? I would be glad for any help: (links to articles, documentation, etc.).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmi3Ut, 2020-12-05
@Dmi3Ut

If both have subscribed to the bot, find out the chat_id and send what we want
bot.send_message(chat_id, msg_text )

A
Anonymous Coder, 2020-12-05
@Geza420

Let the user write to the bot. The bot takes the message, sends it to the admin's ID. When the admin responds to a message (such as reply to..), the admin message is sent to the sender of the first message that the bot sent to the admin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question