mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Merge remote-tracking branch 'upstream/dev-1.x' into dev-1.x
This commit is contained in:
commit
bd8e1473c0
12 changed files with 35 additions and 19 deletions
|
|
@ -20,7 +20,7 @@ else:
|
|||
|
||||
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
||||
|
||||
VERSION = Version(1, 0, 5, stage=Stage.DEV, build=0)
|
||||
VERSION = Version(1, 1, 0, stage=Stage.FINAL, build=0)
|
||||
API_VERSION = Version(3, 5)
|
||||
|
||||
__version__ = VERSION.version
|
||||
|
|
|
|||
|
|
@ -907,8 +907,8 @@ class Bot(BaseBot):
|
|||
|
||||
async def export_chat_invite_link(self, chat_id: typing.Union[base.Integer, base.String]) -> base.String:
|
||||
"""
|
||||
Use this method to export an invite link to a supergroup or a channel.
|
||||
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
||||
Use this method to generate a new invite link for a chat; any previously generated link is revoked.
|
||||
The bot must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
||||
|
||||
Source: https://core.telegram.org/bots/api#exportchatinvitelink
|
||||
|
||||
|
|
|
|||
|
|
@ -444,8 +444,6 @@ class Dispatcher:
|
|||
:param kwargs:
|
||||
:return: decorated function
|
||||
"""
|
||||
if commands is None:
|
||||
commands = []
|
||||
if content_types is None:
|
||||
content_types = ContentType.TEXT
|
||||
if custom_filters is None:
|
||||
|
|
@ -509,8 +507,6 @@ class Dispatcher:
|
|||
:param kwargs:
|
||||
:return: decorated function
|
||||
"""
|
||||
if commands is None:
|
||||
commands = []
|
||||
if content_types is None:
|
||||
content_types = ContentType.TEXT
|
||||
if custom_filters is None:
|
||||
|
|
@ -566,8 +562,6 @@ class Dispatcher:
|
|||
:param kwargs:
|
||||
:return: decorated function
|
||||
"""
|
||||
if commands is None:
|
||||
commands = []
|
||||
if content_types is None:
|
||||
content_types = ContentType.TEXT
|
||||
if custom_filters is None:
|
||||
|
|
|
|||
|
|
@ -100,6 +100,8 @@ class Message(base.TelegramObject):
|
|||
return ContentType.VENUE[0]
|
||||
if self.new_chat_members:
|
||||
return ContentType.NEW_CHAT_MEMBERS[0]
|
||||
if self.left_chat_member:
|
||||
return ContentType.LEFT_CHAT_MEMBER[0]
|
||||
if self.invoice:
|
||||
return ContentType.INVOICE[0]
|
||||
if self.successful_payment:
|
||||
|
|
@ -655,6 +657,7 @@ class ContentType(helper.Helper):
|
|||
:key: LOCATION
|
||||
:key: VENUE
|
||||
:key: NEW_CHAT_MEMBERS
|
||||
:key: LEFT_CHAT_MEMBER
|
||||
:key: INVOICE
|
||||
:key: SUCCESSFUL_PAYMENT
|
||||
"""
|
||||
|
|
@ -673,6 +676,7 @@ class ContentType(helper.Helper):
|
|||
LOCATION = helper.ListItem() # location
|
||||
VENUE = helper.ListItem() # venue
|
||||
NEW_CHAT_MEMBERS = helper.ListItem() # new_chat_member
|
||||
LEFT_CHAT_MEMBER = helper.ListItem() # left_chat_member
|
||||
INVOICE = helper.ListItem() # invoice
|
||||
SUCCESSFUL_PAYMENT = helper.ListItem() # successful_payment
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class User(base.TelegramObject):
|
|||
as_html = True
|
||||
|
||||
if name is None:
|
||||
name = self.mention
|
||||
name = self.full_name
|
||||
if as_html:
|
||||
return markdown.hlink(name, self.url)
|
||||
return markdown.link(name, self.url)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue