Don't let member to send message in telegram group
Solution 1
Now you can do this.
Restriction from chatting in group:
Now you can achieve this with restrictChatMember() Bot API method.
Deletion of users' messages:
For deletion use this method: deleteMessage()
DON'T forget to grant admin rights to your bot.
Solution 2
11/07/18: This answer is no longer up to date please look at woozly's answer
Short answer: No (at least not with the bot api)
Longer answer: There currently is no way of stopping someone from chatting without outright kicking them out of the group. Additionally, bots currently lack the ability to delete messages so that's also not doable with the bot API.
Edit: Actually it's probably possible using the Telegram API instead of the Telegram Bot API where you would just create a regular user which is controlled programmatically to delete messages of "muted" people. I assume that this is likely not as simple as doing stuff with the bot API but in theory, it's possible.
Ashkan
Updated on October 29, 2020Comments
-
Ashkan over 3 years
I'm looking for a way in telegram group that don't let member to send message or, delete message after a person send.
Is it possible to create a bot like this how help admins to stop chatting after start the bot? Is there any other way to do this?
-
Ashkan over 7 yearsyou mean it's not possible to achieve this any way?
-
Hoi_A over 7 years@Ashkan I made an edit for a possible option using the telegram api instead of the bot api. I haven't used the telegram api to make bots before so I don't know much more than that.