\nSend a message directly to the users id. The problem is, the user have to unlock you before, by sending your bot /start
. This may be practical for small groups.\n
t.me/your_bot?start=XXXX
. The user starts your bot in a private chat and sends the parameter (XXXX
). Then you can evalute if its the right keyword and user and then send your message. Even more elegant is to use a InlineKeyBoardButton with this url.show_alert=True
to show a text when the right user clicks it like @nnbbot does it. The drawback of this method is, you can only use up to 200 charachters.Reputation: 610
I am working on a telegram bot project for local people in my area, I would like to know is it possible for bot to reply back to same user that send the command in group chat, but not have the rest of the group see it. I thought I saw this as a possibility, but I cannot find it on python-telegram-bot github.
I am not looking for a copy/pastable code, I just need help in the right direction, I haven't received any responses in the telegram group chat on the matter.
Any help is appreciated.
Upvotes: 1
Views: 2325
Reputation: 139
You have some options
/start
. This may be practical for small groups.t.me/your_bot?start=XXXX
. The user starts your bot in a private chat and sends the parameter (XXXX
). Then you can evalute if its the right keyword and user and then send your message. Even more elegant is to use a InlineKeyBoardButton with this url.show_alert=True
to show a text when the right user clicks it like @nnbbot does it. The drawback of this method is, you can only use up to 200 charachters.Upvotes: 3