Bound method ban_member of
Use as a shortcut for:
client.ban_chat_member( chat_id=chat_id, user_id=user_id )
In regular groups (non-supergroups), this method will only work if the “All Members Are Admins” setting is off in the target group. Otherwise members may only be removed by the group’s creator or by the member that added them.
str) – Unique identifier (int) or username (str) of the target user. For a contact that exists in your Telegram address book you can use his phone number (str).
int, optional) – Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever. Defaults to 0 (ban forever).
bool– On success, a service message will be returned (when applicable), otherwise, in case a message object couldn’t be returned, True is returned.
RPCError – In case of a Telegram RPC error.