admin管理员组文章数量:1391974
My telegram bot can municate with users and I want to send results of their chat to admins telegram account.
I'm using node telegram bot api
as my bot backend. How is it possible to send message to specific @username
via telegram?
My telegram bot can municate with users and I want to send results of their chat to admins telegram account.
I'm using node telegram bot api
as my bot backend. How is it possible to send message to specific @username
via telegram?
- what I do is duplicate every message sent to the user to my own telegram, of course I have to type in my telegram chat id in the program line – fredy kardian Commented Sep 12, 2020 at 12:20
1 Answer
Reset to default 6Multiple strategies can be done to archieve that.
Simplest strategy from the top of my head is:
Initiate a conversation to the bot, send some password that identifies you as admin (i.e. using a custom start
parameter https://telegram.me/ExampleComBot?start=vCH1vGWJxfSeofSAs0K5PA ) and store this chat_id somewhere as you know it is a admin chat_id
. Then, everytime a user chats with the bot, use the bot to send the same message to admin chat_id
.
本文标签: javascriptTelegram bot apisend message via usernameStack Overflow
版权声明:本文标题:javascript - Telegram bot api, send message via @username - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744671584a2618856.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论