diff --git a/docs/source/pyrogram/Client.rst b/docs/source/pyrogram/Client.rst index 5f402c65..d8b04c40 100644 --- a/docs/source/pyrogram/Client.rst +++ b/docs/source/pyrogram/Client.rst @@ -65,6 +65,7 @@ Messages send_poll vote_poll retract_vote + download_media Chats ----- diff --git a/pyrogram/client/methods/__init__.py b/pyrogram/client/methods/__init__.py index eba768bb..ea249e3f 100644 --- a/pyrogram/client/methods/__init__.py +++ b/pyrogram/client/methods/__init__.py @@ -23,7 +23,6 @@ from .decorators import Decorators from .messages import Messages from .password import Password from .users import Users -from .utilities import Utilities class Methods( @@ -32,7 +31,6 @@ class Methods( Password, Chats, Users, - Utilities, Messages, Decorators ): diff --git a/pyrogram/client/methods/messages/__init__.py b/pyrogram/client/methods/messages/__init__.py index 66340283..cfb36fd0 100644 --- a/pyrogram/client/methods/messages/__init__.py +++ b/pyrogram/client/methods/messages/__init__.py @@ -17,6 +17,7 @@ # along with Pyrogram. If not, see . from .delete_messages import DeleteMessages +from .download_media import DownloadMedia from .edit_message_caption import EditMessageCaption from .edit_message_media import EditMessageMedia from .edit_message_reply_markup import EditMessageReplyMarkup @@ -68,6 +69,7 @@ class Messages( SendVoice, SendPoll, VotePoll, - RetractVote + RetractVote, + DownloadMedia ): pass diff --git a/pyrogram/client/methods/utilities/download_media.py b/pyrogram/client/methods/messages/download_media.py similarity index 99% rename from pyrogram/client/methods/utilities/download_media.py rename to pyrogram/client/methods/messages/download_media.py index 33d72f82..1cddfe98 100644 --- a/pyrogram/client/methods/utilities/download_media.py +++ b/pyrogram/client/methods/messages/download_media.py @@ -20,7 +20,7 @@ from threading import Event from typing import Union import pyrogram -from ...ext import BaseClient +from pyrogram.client.ext import BaseClient class DownloadMedia(BaseClient): diff --git a/pyrogram/client/methods/utilities/__init__.py b/pyrogram/client/methods/utilities/__init__.py deleted file mode 100644 index f8db23e5..00000000 --- a/pyrogram/client/methods/utilities/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# Pyrogram - Telegram MTProto API Client Library for Python -# Copyright (C) 2017-2018 Dan Tès -# -# This file is part of Pyrogram. -# -# Pyrogram is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Pyrogram is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with Pyrogram. If not, see . - -from .download_media import DownloadMedia - - -class Utilities( - DownloadMedia -): - pass