How can I send a message to someone with my telegram bot using their Username

后端 未结 7 1004
执笔经年
执笔经年 2020-12-15 17:30

I am using the telepot python library, I know that you can send a message when you have someone\'s UserID(Which is a number). I wanna know if it is possible to send a messag

7条回答
  •  眼角桃花
    2020-12-15 18:25

    1. Post one message from User to the Bot.
    2. Open https://api.telegram.org/bot/getUpdates page.
    3. Find this message and navigate to the result->message->chat->id key.
    4. Use this ID as the [chat_id] parameter to send personal messages to the User.

提交回复
热议问题