version: 2.1.3
banChatSenderChat
Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.
Parameters
chat_id | int | string | Unique identifier for the target chat or username of the target channel (in the format @channelusername) | Optional |
sender_chat_id | int | Unique identifier of the target sender chat | Yes |
token | String | You can use this method on another bot with specify this parameter | Optional |
return_array | Boolean | Specify the result type , if pass true results will be array otherwise will be object | Optional |
forgot | Boolean | You can set to not receive request result, dont set it or pass null for turn it off | Optional |
answer | Boolean | You can set to answer to webhook, dont set it or pass null for turn it off | Optional |
Method errors
ErrorName | description |
---|---|
required parameters not found | required parameter for this method is not founded. you can see them in log |
answer mode not allowed | you can use answer mode only once for each webhook update and you already did |
answer mode not allowed bc multi | you can't use answer mode when multi is on |
Method examples
$this->banChatSenderChat(['chat_id' => int | string, 'sender_chat_id' => int]);
$this->banChatSenderChat(['sender_chat_id' => int]);
Method alices
banchatsenderchat
banSender