diff --git a/pyrogram/client/methods/bots/__init__.py b/pyrogram/client/methods/bots/__init__.py index 62e0eb61..2d89c2fb 100644 --- a/pyrogram/client/methods/bots/__init__.py +++ b/pyrogram/client/methods/bots/__init__.py @@ -16,12 +16,16 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . -from .callback_query import CallbackQuery -from .inline import Inline +from .answer_callback_query import AnswerCallbackQuery +from .get_inline_bot_results import GetInlineBotResults +from .request_callback_answer import RequestCallbackAnswer +from .send_inline_bot_result import SendInlineBotResult class Bots( - CallbackQuery, - Inline + AnswerCallbackQuery, + GetInlineBotResults, + RequestCallbackAnswer, + SendInlineBotResult ): pass diff --git a/pyrogram/client/methods/bots/callback_query/answer_callback_query.py b/pyrogram/client/methods/bots/answer_callback_query.py similarity index 98% rename from pyrogram/client/methods/bots/callback_query/answer_callback_query.py rename to pyrogram/client/methods/bots/answer_callback_query.py index a4baa166..64951692 100644 --- a/pyrogram/client/methods/bots/callback_query/answer_callback_query.py +++ b/pyrogram/client/methods/bots/answer_callback_query.py @@ -17,7 +17,7 @@ # along with Pyrogram. If not, see . from pyrogram.api import functions -from ....ext import BaseClient +from pyrogram.client.ext import BaseClient class AnswerCallbackQuery(BaseClient): diff --git a/pyrogram/client/methods/bots/callback_query/__init__.py b/pyrogram/client/methods/bots/callback_query/__init__.py deleted file mode 100644 index 76575724..00000000 --- a/pyrogram/client/methods/bots/callback_query/__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 .answer_callback_query import AnswerCallbackQuery - - -class CallbackQuery( - AnswerCallbackQuery -): - pass diff --git a/pyrogram/client/methods/bots/inline/get_inline_bot_results.py b/pyrogram/client/methods/bots/get_inline_bot_results.py similarity index 98% rename from pyrogram/client/methods/bots/inline/get_inline_bot_results.py rename to pyrogram/client/methods/bots/get_inline_bot_results.py index 52c3b005..a43eb6c1 100644 --- a/pyrogram/client/methods/bots/inline/get_inline_bot_results.py +++ b/pyrogram/client/methods/bots/get_inline_bot_results.py @@ -18,7 +18,7 @@ from pyrogram.api import functions, types from pyrogram.api.errors import UnknownError -from ....ext import BaseClient +from pyrogram.client.ext import BaseClient class GetInlineBotResults(BaseClient): diff --git a/pyrogram/client/methods/bots/inline/__init__.py b/pyrogram/client/methods/bots/inline/__init__.py deleted file mode 100644 index af88c57e..00000000 --- a/pyrogram/client/methods/bots/inline/__init__.py +++ /dev/null @@ -1,27 +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 .get_inline_bot_results import GetInlineBotResults -from .send_inline_bot_result import SendInlineBotResult - - -class Inline( - SendInlineBotResult, - GetInlineBotResults -): - pass diff --git a/pyrogram/client/methods/bots/inline/send_inline_bot_result.py b/pyrogram/client/methods/bots/send_inline_bot_result.py similarity index 98% rename from pyrogram/client/methods/bots/inline/send_inline_bot_result.py rename to pyrogram/client/methods/bots/send_inline_bot_result.py index 947433cd..c194298a 100644 --- a/pyrogram/client/methods/bots/inline/send_inline_bot_result.py +++ b/pyrogram/client/methods/bots/send_inline_bot_result.py @@ -17,7 +17,7 @@ # along with Pyrogram. If not, see . from pyrogram.api import functions -from ....ext import BaseClient +from pyrogram.client.ext import BaseClient class SendInlineBotResult(BaseClient): diff --git a/pyrogram/client/methods/messages/__init__.py b/pyrogram/client/methods/messages/__init__.py index c2ff2400..e2c2462e 100644 --- a/pyrogram/client/methods/messages/__init__.py +++ b/pyrogram/client/methods/messages/__init__.py @@ -16,22 +16,50 @@ # You should have received a copy of the GNU Lesser General Public License # along with Pyrogram. If not, see . -from .action import Action +from .delete_messages import DeleteMessages +from .edit_message_caption import EditMessageCaption +from .edit_message_reply_markup import EditMessageReplyMarkup +from .edit_message_text import EditMessageText from .forward_messages import ForwardMessages from .get_history import GetHistory from .get_messages import GetMessages -from .media import Media +from .send_audio import SendAudio +from .send_chat_action import SendChatAction +from .send_contact import SendContact +from .send_document import SendDocument +from .send_gif import SendGIF +from .send_location import SendLocation +from .send_media_group import SendMediaGroup from .send_message import SendMessage -from .update import Update +from .send_photo import SendPhoto +from .send_sticker import SendSticker +from .send_venue import SendVenue +from .send_video import SendVideo +from .send_video_note import SendVideoNote +from .send_voice import SendVoice class Messages( + DeleteMessages, + EditMessageCaption, + EditMessageReplyMarkup, + EditMessageText, + ForwardMessages, GetHistory, GetMessages, - Action, - Media, - Update, - ForwardMessages, - SendMessage + SendAudio, + SendChatAction, + SendContact, + SendDocument, + SendGIF, + SendLocation, + SendMediaGroup, + SendMessage, + SendPhoto, + SendSticker, + SendVenue, + SendVideo, + SendVideoNote, + SendVoice ): pass diff --git a/pyrogram/client/methods/messages/action/__init__.py b/pyrogram/client/methods/messages/action/__init__.py deleted file mode 100644 index 639405f2..00000000 --- a/pyrogram/client/methods/messages/action/__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 .send_chat_action import SendChatAction - - -class Action( - SendChatAction -): - pass diff --git a/pyrogram/client/methods/messages/update/delete_messages.py b/pyrogram/client/methods/messages/delete_messages.py similarity index 98% rename from pyrogram/client/methods/messages/update/delete_messages.py rename to pyrogram/client/methods/messages/delete_messages.py index 3d29bf55..a4c97c76 100644 --- a/pyrogram/client/methods/messages/update/delete_messages.py +++ b/pyrogram/client/methods/messages/delete_messages.py @@ -17,7 +17,7 @@ # along with Pyrogram. If not, see . from pyrogram.api import functions, types -from ....ext import BaseClient +from pyrogram.client.ext import BaseClient class DeleteMessages(BaseClient): diff --git a/pyrogram/client/methods/messages/update/edit_message_caption.py b/pyrogram/client/methods/messages/edit_message_caption.py similarity index 98% rename from pyrogram/client/methods/messages/update/edit_message_caption.py rename to pyrogram/client/methods/messages/edit_message_caption.py index 90bf26f7..25276dc2 100644 --- a/pyrogram/client/methods/messages/update/edit_message_caption.py +++ b/pyrogram/client/methods/messages/edit_message_caption.py @@ -17,7 +17,7 @@ # along with Pyrogram. If not, see . from pyrogram.api import functions, types -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class EditMessageCaption(BaseClient): diff --git a/pyrogram/client/methods/messages/update/edit_message_reply_markup.py b/pyrogram/client/methods/messages/edit_message_reply_markup.py similarity index 98% rename from pyrogram/client/methods/messages/update/edit_message_reply_markup.py rename to pyrogram/client/methods/messages/edit_message_reply_markup.py index 295eb258..b840adab 100644 --- a/pyrogram/client/methods/messages/update/edit_message_reply_markup.py +++ b/pyrogram/client/methods/messages/edit_message_reply_markup.py @@ -17,7 +17,7 @@ # along with Pyrogram. If not, see . from pyrogram.api import functions, types -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class EditMessageReplyMarkup(BaseClient): diff --git a/pyrogram/client/methods/messages/update/edit_message_text.py b/pyrogram/client/methods/messages/edit_message_text.py similarity index 98% rename from pyrogram/client/methods/messages/update/edit_message_text.py rename to pyrogram/client/methods/messages/edit_message_text.py index be7b380c..741c0890 100644 --- a/pyrogram/client/methods/messages/update/edit_message_text.py +++ b/pyrogram/client/methods/messages/edit_message_text.py @@ -17,7 +17,7 @@ # along with Pyrogram. If not, see . from pyrogram.api import functions, types -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class EditMessageText(BaseClient): diff --git a/pyrogram/client/methods/messages/media/__init__.py b/pyrogram/client/methods/messages/media/__init__.py deleted file mode 100644 index b0e287c5..00000000 --- a/pyrogram/client/methods/messages/media/__init__.py +++ /dev/null @@ -1,47 +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 .send_audio import SendAudio -from .send_contact import SendContact -from .send_document import SendDocument -from .send_gif import SendGIF -from .send_location import SendLocation -from .send_media_group import SendMediaGroup -from .send_photo import SendPhoto -from .send_sticker import SendSticker -from .send_venue import SendVenue -from .send_video import SendVideo -from .send_video_note import SendVideoNote -from .send_voice import SendVoice - - -class Media( - SendContact, - SendVenue, - SendLocation, - SendMediaGroup, - SendVideoNote, - SendVoice, - SendVideo, - SendGIF, - SendSticker, - SendDocument, - SendAudio, - SendPhoto -): - pass diff --git a/pyrogram/client/methods/messages/media/send_audio.py b/pyrogram/client/methods/messages/send_audio.py similarity index 99% rename from pyrogram/client/methods/messages/media/send_audio.py rename to pyrogram/client/methods/messages/send_audio.py index 41f4457f..7d590b79 100644 --- a/pyrogram/client/methods/messages/media/send_audio.py +++ b/pyrogram/client/methods/messages/send_audio.py @@ -23,7 +23,7 @@ import struct from pyrogram.api import functions, types from pyrogram.api.errors import FileIdInvalid, FilePartMissing -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendAudio(BaseClient): diff --git a/pyrogram/client/methods/messages/action/send_chat_action.py b/pyrogram/client/methods/messages/send_chat_action.py similarity index 98% rename from pyrogram/client/methods/messages/action/send_chat_action.py rename to pyrogram/client/methods/messages/send_chat_action.py index 4b34dd40..49625b48 100644 --- a/pyrogram/client/methods/messages/action/send_chat_action.py +++ b/pyrogram/client/methods/messages/send_chat_action.py @@ -17,7 +17,7 @@ # along with Pyrogram. If not, see . from pyrogram.api import functions -from ....ext import BaseClient, ChatAction +from pyrogram.client.ext import BaseClient, ChatAction class SendChatAction(BaseClient): diff --git a/pyrogram/client/methods/messages/media/send_contact.py b/pyrogram/client/methods/messages/send_contact.py similarity index 98% rename from pyrogram/client/methods/messages/media/send_contact.py rename to pyrogram/client/methods/messages/send_contact.py index eb1bb6c4..fc0abdd5 100644 --- a/pyrogram/client/methods/messages/media/send_contact.py +++ b/pyrogram/client/methods/messages/send_contact.py @@ -17,7 +17,7 @@ # along with Pyrogram. If not, see . from pyrogram.api import functions, types -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendContact(BaseClient): diff --git a/pyrogram/client/methods/messages/media/send_document.py b/pyrogram/client/methods/messages/send_document.py similarity index 99% rename from pyrogram/client/methods/messages/media/send_document.py rename to pyrogram/client/methods/messages/send_document.py index 1092147f..b2b5c532 100644 --- a/pyrogram/client/methods/messages/media/send_document.py +++ b/pyrogram/client/methods/messages/send_document.py @@ -23,7 +23,7 @@ import struct from pyrogram.api import functions, types from pyrogram.api.errors import FileIdInvalid, FilePartMissing -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendDocument(BaseClient): diff --git a/pyrogram/client/methods/messages/media/send_gif.py b/pyrogram/client/methods/messages/send_gif.py similarity index 99% rename from pyrogram/client/methods/messages/media/send_gif.py rename to pyrogram/client/methods/messages/send_gif.py index 0d4bb4b9..a4a14d84 100644 --- a/pyrogram/client/methods/messages/media/send_gif.py +++ b/pyrogram/client/methods/messages/send_gif.py @@ -23,7 +23,7 @@ import struct from pyrogram.api import functions, types from pyrogram.api.errors import FileIdInvalid, FilePartMissing -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendGIF(BaseClient): diff --git a/pyrogram/client/methods/messages/media/send_location.py b/pyrogram/client/methods/messages/send_location.py similarity index 98% rename from pyrogram/client/methods/messages/media/send_location.py rename to pyrogram/client/methods/messages/send_location.py index 08dac02b..a3db2561 100644 --- a/pyrogram/client/methods/messages/media/send_location.py +++ b/pyrogram/client/methods/messages/send_location.py @@ -17,7 +17,7 @@ # along with Pyrogram. If not, see . from pyrogram.api import functions, types -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendLocation(BaseClient): diff --git a/pyrogram/client/methods/messages/media/send_media_group.py b/pyrogram/client/methods/messages/send_media_group.py similarity index 99% rename from pyrogram/client/methods/messages/media/send_media_group.py rename to pyrogram/client/methods/messages/send_media_group.py index 6d004d9f..297d8f83 100644 --- a/pyrogram/client/methods/messages/media/send_media_group.py +++ b/pyrogram/client/methods/messages/send_media_group.py @@ -24,7 +24,7 @@ import struct from pyrogram.api import functions, types from pyrogram.api.errors import FileIdInvalid from pyrogram.client import types as pyrogram_types -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendMediaGroup(BaseClient): diff --git a/pyrogram/client/methods/messages/media/send_photo.py b/pyrogram/client/methods/messages/send_photo.py similarity index 99% rename from pyrogram/client/methods/messages/media/send_photo.py rename to pyrogram/client/methods/messages/send_photo.py index 52e98ff1..a6264bf3 100644 --- a/pyrogram/client/methods/messages/media/send_photo.py +++ b/pyrogram/client/methods/messages/send_photo.py @@ -22,7 +22,7 @@ import struct from pyrogram.api import functions, types from pyrogram.api.errors import FileIdInvalid, FilePartMissing -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendPhoto(BaseClient): diff --git a/pyrogram/client/methods/messages/media/send_sticker.py b/pyrogram/client/methods/messages/send_sticker.py similarity index 99% rename from pyrogram/client/methods/messages/media/send_sticker.py rename to pyrogram/client/methods/messages/send_sticker.py index 639e3600..fbf7a205 100644 --- a/pyrogram/client/methods/messages/media/send_sticker.py +++ b/pyrogram/client/methods/messages/send_sticker.py @@ -22,7 +22,7 @@ import struct from pyrogram.api import functions, types from pyrogram.api.errors import FileIdInvalid, FilePartMissing -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendSticker(BaseClient): diff --git a/pyrogram/client/methods/messages/media/send_venue.py b/pyrogram/client/methods/messages/send_venue.py similarity index 98% rename from pyrogram/client/methods/messages/media/send_venue.py rename to pyrogram/client/methods/messages/send_venue.py index d65ea43b..50946e86 100644 --- a/pyrogram/client/methods/messages/media/send_venue.py +++ b/pyrogram/client/methods/messages/send_venue.py @@ -17,7 +17,7 @@ # along with Pyrogram. If not, see . from pyrogram.api import functions, types -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendVenue(BaseClient): diff --git a/pyrogram/client/methods/messages/media/send_video.py b/pyrogram/client/methods/messages/send_video.py similarity index 99% rename from pyrogram/client/methods/messages/media/send_video.py rename to pyrogram/client/methods/messages/send_video.py index a4cc0309..b86b4702 100644 --- a/pyrogram/client/methods/messages/media/send_video.py +++ b/pyrogram/client/methods/messages/send_video.py @@ -23,7 +23,7 @@ import struct from pyrogram.api import functions, types from pyrogram.api.errors import FileIdInvalid, FilePartMissing -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendVideo(BaseClient): diff --git a/pyrogram/client/methods/messages/media/send_video_note.py b/pyrogram/client/methods/messages/send_video_note.py similarity index 99% rename from pyrogram/client/methods/messages/media/send_video_note.py rename to pyrogram/client/methods/messages/send_video_note.py index d7b417d5..a266e5dd 100644 --- a/pyrogram/client/methods/messages/media/send_video_note.py +++ b/pyrogram/client/methods/messages/send_video_note.py @@ -23,7 +23,7 @@ import struct from pyrogram.api import functions, types from pyrogram.api.errors import FileIdInvalid, FilePartMissing -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendVideoNote(BaseClient): diff --git a/pyrogram/client/methods/messages/media/send_voice.py b/pyrogram/client/methods/messages/send_voice.py similarity index 99% rename from pyrogram/client/methods/messages/media/send_voice.py rename to pyrogram/client/methods/messages/send_voice.py index ae21de6d..f4fe4229 100644 --- a/pyrogram/client/methods/messages/media/send_voice.py +++ b/pyrogram/client/methods/messages/send_voice.py @@ -23,7 +23,7 @@ import struct from pyrogram.api import functions, types from pyrogram.api.errors import FileIdInvalid, FilePartMissing -from ....ext import BaseClient, utils +from pyrogram.client.ext import BaseClient, utils class SendVoice(BaseClient): diff --git a/pyrogram/client/methods/messages/update/__init__.py b/pyrogram/client/methods/messages/update/__init__.py deleted file mode 100644 index cc913e23..00000000 --- a/pyrogram/client/methods/messages/update/__init__.py +++ /dev/null @@ -1,31 +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 .delete_messages import DeleteMessages -from .edit_message_caption import EditMessageCaption -from .edit_message_reply_markup import EditMessageReplyMarkup -from .edit_message_text import EditMessageText - - -class Update( - DeleteMessages, - EditMessageReplyMarkup, - EditMessageCaption, - EditMessageText -): - pass