I have webhook a telegram bot for search data my a hosted How can ignore positive chat I'd by bot I have a bot to search files from my hosted data And get link using telegram I want that bot just work in groups only If any person try to use it in personal chat it will not give reply means not search data and not give a link
Asked
Active
Viewed 503 times
-2
-
'.', ',', ':', '!', '?', ';' ...? – Andrey Tyukin Jan 20 '18 at 23:47
2 Answers
0
Every message has a chat field and each chat has a type see telegram bot api
Type of chat, can be either “private”, “group”, “supergroup” or “channel”
check if type of chat of message is equal to “group” or “supergroup” then do what you want.
In php can check like below
if($message->chat->type == "group")
...

Community
- 1
- 1

amin saffar
- 1,953
- 3
- 22
- 34
-
yes,Please add code to your question, then I edit it and show you how exactly @LalitSachdeva – amin saffar Feb 04 '18 at 18:26
-1
Can you clear before using this command if($message->chat->type == "group") Need other commands in header Or full command please