Fix Chat.restrict and Chat.promote methods.

This commit is contained in:
Alex Root Junior 2018-09-28 03:18:38 +03:00
parent 7cea6ba4e8
commit 09293063d3

View file

@ -232,7 +232,7 @@ class Chat(base.TelegramObject):
:return: Returns True on success.
:rtype: :obj:`base.Boolean`
"""
return self.bot.restrict_chat_member(self.id, user_id=user_id, until_date=until_date,
return await self.bot.restrict_chat_member(self.id, user_id=user_id, until_date=until_date,
can_send_messages=can_send_messages,
can_send_media_messages=can_send_media_messages,
can_send_other_messages=can_send_other_messages,
@ -277,7 +277,7 @@ class Chat(base.TelegramObject):
:return: Returns True on success.
:rtype: :obj:`base.Boolean`
"""
return self.bot.promote_chat_member(self.id,
return await self.bot.promote_chat_member(self.id,
user_id=user_id,
can_change_info=can_change_info,
can_post_messages=can_post_messages,