D
D
dasehak2020-08-19 23:01:23
Python
dasehak, 2020-08-19 23:01:23

How to forward a message sent to a bot in Telebot to another person?

Can you please tell me how to send a message sent to a bot to another person using the Telebot library?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
soremix, 2020-08-19
@dasehak

To forward a message, use a function that is literally called forward message
tb.forward_message(to_chat_id, from_chat_id, message_id)

S
shurshur, 2020-08-20
@shurshur

bot.send_message(chat_id_of_desired_user, message.text)
is to send a similar text, but the original author will not be visible
or
bot.forward_message(chat_id_of_desired_user, message.chat.id, message.text)
is to make a real forward (it will be written that the message forwarded from such and such)

D
Dmitry Shevchenko, 2020-08-20
@ZER0x32

in the decorator, we add sending a message to the previously saved message. chat. id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question