使用电报机器人 pytelegrambotapi 从组回复用户的消息



因此,我正在创建机器人程序以获得支持。它的工作原理非常简单:用户将消息发送给bot,bot将消息发送到私人组。在私人团体中,有来自支持者的人。他们只需要回复转发的消息

所以,我已经完成了第一部分——将消息从机器人转发到群组。如何在我的私人群中回复此消息,并使用pytelegrapmbotapi库将其转发回?

在这里你可以看到消息是如何进入私人组的

@bot.channel_post_handler(content_types = ['text'])#citySupportName
def process_step2(message):
bot.forward_message(0000000000, message.chat.id, message.message_id)
bot.send_message(message.chat.id, "Operator is here!")

也许你必须添加这样的聊天类型:

@bot.message_handler(content_types=["text"], chat_types=["private", "group"])

最新更新