电报机器人API当用户单击“启动”时如何创建自动按摩

发布于 2025-01-27 07:11:25 字数 567 浏览 0 评论 0 原文

我创建电报机器人。当用户单击启动时,如何创建自动按摩 这样的“感谢您与我们的机器人的联系”。

  1. 是否可以创建一种算法,用户可以通过我的网站连接到机器人,而无需访问电报,而无需按 /启动 /启动。 结果,我需要在电报中向用户发送通知,

此刻,我有算法

  1. 将用户转到我的电报bot,然后按下启动
  2. - 复出到我的网站,按下按钮触发“连接到bot”和我转到电报API(getupdates)和电报中的用户ID,我将发送消息。

我从这个URL获得的对象 https://api.telegram.org/bot/bot/bot getUpdates?offset = -1

在此处输入图像说明

I create telegram bot. How to create auto massage when user click start
like this "THanks for connection to our bot".

  1. Is it possible to create an algorithm by which the user will be able to connect to the Bot from my site without going to the telegram and without pressing /START.
    As a result, I need to send notifications to the user in telegram

at this moment i have algorithm

  1. the user go to my telegram BOT and presses the start
  2. after - comeback to my site, presse the button-trigger "connect to the bot" and i go to url telegram API (getUpdates) and the userID in the telegram to which I will send a message.

object i get from this url
https://api.telegram.org/bot/getUpdates?offset=-1

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

策马西风 2025-02-03 07:11:25

希望这对您有帮助,

  1. 我不知道您使用哪个库。因此,您可以检查此 page 带有语言和库的机器人示例。
  2. 不幸的是,用户将无需电报就无法从您的网站连接到机器人。

Hope this helps you

  1. I don't know which library you use. So you can check this page with examples of bots for your language and library.
  2. Unfortunately the user won't be able to connect to the Bot from your site without going to the Telegram.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文