可以使用 Telegram 机器人转发整个聊天或群组帖子吗?

huangapple go评论73阅读模式
英文:

Is it possible to forward whole chat/group posts using telegram bot?

问题

我正在使用 python-telegram-bot 库编写一个Python机器人,它将所有群组的帖子转发到另一个机器人是管理员的群组。

是否有方法可以访问群组/聊天的所有帖子?

类似这样的吗?

async def forward_messages(update: Update, context: ContextTypes.DEFAULT_TYPE):
    chat = await context.bot.get_chat("<group-id>")
    #get_messages??
英文:

I'm using the python-telegram-bot library to write a bot in Python that forwards all group posts to another group where the bot is administrator.

Is there any method that I could use to access all posts of a group/chat?

something like this?

async def forward_messages(update: Update, context: ContextTypes.DEFAULT_TYPE):
    chat = await context.bot.get_chat(&quot;&lt;group-id&gt;&quot;)
    #get_messages??

答案1

得分: 1

没有,没有。机器人可用的方法在Telegram的Bot API文档中列出。

英文:

No, there is not. The methods available for bots are listed in Telegrams Bot API documentation.

huangapple
  • 本文由 发表于 2023年4月13日 20:26:19
  • 转载请务必保留本文链接:https://go.coder-hub.com/76005423.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定