/ban
Description and use the command /ban
Bot's command /ban
is able moderators and administrators to ban users for a certain period or forever.
Note. This command supports arguments! Read the following paragraphs for the details
Note. This command supports "quiet" mode. In this mode, your commands will be deleted, and members of your chat will not see any notifications To use "quiet" mode add "q" before the command (like /qban instead of /ban)
Configuration of the command
Press the button "Chat settings" near the selected chat on the "My Chats" page
Open "Moderation" settings by clicking the corresponding menu item
Enable
/ban
command on the page
Command usage
This command is available only for moderators and administrators in the chat
Simple usage
Just send /ban
as a reply to a message and the user will be banned and the message will be removed.
Or you may use the /ban
command with one argument - the user mention:
Usage with arguments
Command /ban
supports the following arguments:
Length of the ban in minutes, hours, and days
"No-delete" mark which prevents to deletion of the message from the banned user
Reason - the reason that will be saved
Ban a user by the mention
/ban <mention> <reason>
Arguments for the /ban command in this case are:
mention
(required) - any valid user mention (just type @ and then mention any user in your chat by username or by name)duration
(optional) - the period for which the user will be blocked. If not provided - the user will be banned forever Xm - X minutes Xh - X hours Xd - X daysreason
(optional) - a reason for the ban will be saved and printed
Ban a user by reply
You can also ban a user by replying to their message with the ban command
/ban <duration> <delete> <reason>
Arguments for the /bane command in this case are:
duration
(optional) - the period for which the user will be blocked. If not provided - the user will be banned forever Xm - X minutes Xh - X hours Xd - X daysdelete
(optional) - if this argument isno-delete
, the message you reply to won't be deletedreason
(optional) - a reason for the ban will be saved and printed
Let's ban a user for 1 hour:
Now let's ban the user forever, but keep its message
Also, you may combine both arguments in any order. In the example below, we will ban the user for 5 days and keep its message
Last updated