mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
fix: silent update
Special thanks for @levlam for silent Telegram API updates with removing fields.
This commit is contained in:
parent
910e4d7784
commit
01ae01661d
1 changed files with 2 additions and 10 deletions
|
|
@ -1818,14 +1818,11 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin):
|
||||||
self,
|
self,
|
||||||
chat_id: typing.Union[base.Integer, base.String],
|
chat_id: typing.Union[base.Integer, base.String],
|
||||||
sender_chat_id: base.Integer,
|
sender_chat_id: base.Integer,
|
||||||
until_date: typing.Union[
|
|
||||||
base.Integer, datetime.datetime, datetime.timedelta, None
|
|
||||||
] = None,
|
|
||||||
):
|
):
|
||||||
"""Ban a channel chat in a supergroup or a channel.
|
"""Ban a channel chat in a supergroup or a channel.
|
||||||
|
|
||||||
The owner of the chat will not be able to send messages and join
|
Until the chat is unbanned, the owner of the banned chat won't
|
||||||
live streams on behalf of the chat, unless it is unbanned first.
|
be able to send messages on behalf of any of their channels.
|
||||||
The bot must be an administrator in the supergroup or channel
|
The bot must be an administrator in the supergroup or channel
|
||||||
for this to work and must have the appropriate administrator
|
for this to work and must have the appropriate administrator
|
||||||
rights. Returns True on success.
|
rights. Returns True on success.
|
||||||
|
|
@ -1837,12 +1834,7 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin):
|
||||||
@channelusername)
|
@channelusername)
|
||||||
:param sender_chat_id: Unique identifier of the target sender
|
:param sender_chat_id: Unique identifier of the target sender
|
||||||
chat
|
chat
|
||||||
:param until_date: Date when the sender chat will be unbanned,
|
|
||||||
unix time. If the chat is banned for more than 366 days or
|
|
||||||
less than 30 seconds from the current time they are
|
|
||||||
considered to be banned forever.
|
|
||||||
"""
|
"""
|
||||||
until_date = prepare_arg(until_date)
|
|
||||||
payload = generate_payload(**locals())
|
payload = generate_payload(**locals())
|
||||||
|
|
||||||
return await self.request(api.Methods.BAN_CHAT_SENDER_CHAT, payload)
|
return await self.request(api.Methods.BAN_CHAT_SENDER_CHAT, payload)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue