ban_chat_sender_chat

template<class Agent>
api_result<boolean_t, Agent&&> ban_chat_sender_chat(Agent &&agent, ban_chat_sender_chat_args_t args)
template<class Agent, class F>
void ban_chat_sender_chat(Agent &&agent, ban_chat_sender_chat_args_t args, F &&callback)

agent is any object satisfying agent concept.

callback is any callable object accepting expected<boolean_t>.

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.

struct ban_chat_sender_chat_args_t

Arguments that should be passed to ban_chat_sender_chat().

variant_t<integer_t, string_t> chat_id

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

integer_t sender_chat_id

Unique identifier of the target sender chat