mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Relative imports and reformat code (auto)
This commit is contained in:
parent
6a64573e44
commit
0295aed615
8 changed files with 19 additions and 6 deletions
|
|
@ -211,7 +211,7 @@ class ChatActions(helper.Helper):
|
|||
|
||||
@classmethod
|
||||
async def _do(cls, action: str, sleep=None):
|
||||
from aiogram.dispatcher.ctx import get_bot, get_chat
|
||||
from ..dispatcher.ctx import get_bot, get_chat
|
||||
await get_bot().send_chat_action(get_chat(), action)
|
||||
if sleep:
|
||||
await asyncio.sleep(sleep)
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import datetime
|
||||
|
||||
from aiogram.utils import helper
|
||||
from . import base
|
||||
from . import fields
|
||||
from .user import User
|
||||
from ..utils import helper
|
||||
|
||||
|
||||
class ChatMember(base.TelegramObject):
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ class MediaGroup(base.TelegramObject):
|
|||
"""
|
||||
Helper for sending media group
|
||||
"""
|
||||
|
||||
def __init__(self, medias: typing.Optional[typing.List[typing.Union[InputMedia, typing.Dict]]] = None):
|
||||
super(MediaGroup, self).__init__()
|
||||
self.media = []
|
||||
|
|
|
|||
|
|
@ -31,4 +31,4 @@ class PreCheckoutQuery(base.TelegramObject):
|
|||
def __eq__(self, other):
|
||||
if isinstance(other, type(self)):
|
||||
return other.id == self.id
|
||||
return self.id == other
|
||||
return self.id == other
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue