Fixed optional arguments in new methods (API 5.1)

This commit is contained in:
Alex Root Junior 2021-03-14 20:17:40 +02:00
parent cd047e8d01
commit 76955bf8f1
2 changed files with 10 additions and 10 deletions

View file

@ -1579,7 +1579,7 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin):
are considered to be banned forever. Applied for supergroups and channels
only.
:type until_date: :obj:`typing.Union[base.Integer, datetime.datetime,
datetime.timedelta, None`
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
@ -1817,8 +1817,8 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin):
async def create_chat_invite_link(self,
chat_id: typing.Union[base.Integer, base.String],
expire_date: typing.Union[base.Integer, datetime.datetime,
datetime.timedelta, None],
member_limit: typing.Optional[base.Integer],
datetime.timedelta, None] = None,
member_limit: typing.Optional[base.Integer] = None,
) -> types.ChatInviteLink:
"""
Use this method to create an additional invite link for a chat.
@ -1853,8 +1853,8 @@ class Bot(BaseBot, DataMixin, ContextInstanceMixin):
chat_id: typing.Union[base.Integer, base.String],
invite_link: base.String,
expire_date: typing.Union[base.Integer, datetime.datetime,
datetime.timedelta, None],
member_limit: typing.Optional[base.Integer],
datetime.timedelta, None] = None,
member_limit: typing.Optional[base.Integer] = None,
) -> types.ChatInviteLink:
"""
Use this method to edit a non-primary invite link created by the bot.

View file

@ -210,7 +210,7 @@ class Chat(base.TelegramObject):
are considered to be banned forever. Applied for supergroups and channels
only.
:type until_date: :obj:`typing.Union[base.Integer, datetime.datetime,
datetime.timedelta, None`
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
@ -574,8 +574,8 @@ class Chat(base.TelegramObject):
async def create_invite_link(self,
expire_date: typing.Union[base.Integer, datetime.datetime,
datetime.timedelta, None],
member_limit: typing.Optional[base.Integer],
datetime.timedelta, None] = None,
member_limit: typing.Optional[base.Integer] = None,
) -> ChatInviteLink:
""" Shortcut for createChatInviteLink method. """
return await self.bot.create_chat_invite_link(
@ -587,8 +587,8 @@ class Chat(base.TelegramObject):
async def edit_invite_link(self,
invite_link: base.String,
expire_date: typing.Union[base.Integer, datetime.datetime,
datetime.timedelta, None],
member_limit: typing.Optional[base.Integer],
datetime.timedelta, None] = None,
member_limit: typing.Optional[base.Integer] = None,
) -> ChatInviteLink:
""" Shortcut for editChatInviteLink method. """
return await self.bot.edit_chat_invite_link(