Don't let member to send message in telegram group
Asked Answered
D

4

8

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?

Disgrace answered 7/1, 2017 at 12:6 Comment(0)
T
3

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.

Timbering answered 10/7, 2018 at 10:48 Comment(0)
L
3

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.
Lop answered 7/2, 2017 at 13:29 Comment(2)
you mean it's not possible to achieve this any way?Disgrace
@Disgrace 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.Lop
T
3

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.

Timbering answered 10/7, 2018 at 10:48 Comment(0)
T
0

@telemethebot has exact the feature you request:

Silent Mode

When group silent mode switched on, only group administrators can speak in that group. This help you turning your Telegram supergroup to a channel temporarily.

Teleme - Features

Titular answered 29/10, 2018 at 6:28 Comment(0)
E
0

Using the ChatPermissions API, you can directly set a global mute for all members. https://core.telegram.org/bots/api#chatpermissions

Emblaze answered 30/6 at 12:50 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.