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?

Share Improve this question asked Feb 1, 2016 at 8:10 Mr.DMr.D 7,91315 gold badges69 silver badges126 bronze badges 1
  • 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
Add a ment  | 

1 Answer 1

Reset to default 6

Multiple 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