向任何机器人用户发送消息 [英] sendMessage to any bot user

查看:53
本文介绍了向任何机器人用户发送消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个服务器机器人(用 cronjobs 和 PHP 制作):如果满足条件,机器人会发送一封包含特定消息的邮件.我注意到任何收到邮件的人也有一个 Telegram 帐户.我想要做的是:我创建一个机器人,而不是发送邮件,机器人发布用户通常通过邮件收到的消息.

I have a server bot (made with cronjobs and PHP): if a condition is met, the bot sends a mail containing a specific message. I noticed any person receiving the mail message has a Telegram account too. What I want to do is the following: I create a bot and, instead of sending mails, the bot posts the message users generally receive by mail.

我使用命令行尝试了以下操作:

I tried the following using the command line:

curl -s -X POST https://api.telegram.org/botToken/sendMessage -d text="hello from the bot" -d chat_id=0000000

我的机器人收到了这条消息,但我不太明白的是:这条消息会到达任何其他机器人用户吗?

My bot receives the message but what I don't understand well is: will this message reach ANY other bot user?

感谢任何建议.

提前致谢

推荐答案

由于 机器人常见问题解答在电报网站:

如何一次向我的机器人的所有订阅者发送消息?
不幸的是,目前我们没有发送批量消息的方法,例如通知.我们可能会在未来添加类似这些内容的内容.

How can I message all of my bot's subscribers at once?
Unfortunately, at this moment we don't have methods for sending bulk messages, e.g. notifications. We may add something along these lines in the future.

这篇关于向任何机器人用户发送消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆