From 0db2461318f42aad3a5b6267fe5b7f830f0a9b6e Mon Sep 17 00:00:00 2001 From: Oleg A Date: Thu, 11 Mar 2021 09:12:24 +0300 Subject: [PATCH] Added the parameter revoke_messages to the method kickChatMember --- aiogram/bot/bot.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/aiogram/bot/bot.py b/aiogram/bot/bot.py index 2d116a82..5db66758 100644 --- a/aiogram/bot/bot.py +++ b/aiogram/bot/bot.py @@ -1555,6 +1555,7 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin): user_id: base.Integer, until_date: typing.Union[base.Integer, datetime.datetime, datetime.timedelta, None] = None, + revoke_messages: typing.Optional[base.Boolean] = None, ) -> base.Boolean: """ Use this method to kick a user from a group, a supergroup or a channel. @@ -1580,6 +1581,12 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin): :type until_date: :obj:`typing.Union[base.Integer, datetime.datetime, datetime.timedelta, None` + :param revoke_messages: Pass True to delete all messages from the chat for + the user that is being removed. If False, the user will be able to see + messages in the group that were sent before the user was removed. Always + True for supergroups and channels. + :type revoke_messages: :obj:`typing.Optional[base.Boolean]` + :return: Returns True on success :rtype: :obj:`base.Boolean` """